I'm trying a version of the code with the concavity of the parabola upwards (y=x^2), but I'm not succeeding. I appreciate any help.
Manipulate[
With[{np = NextPrime[xf]},
Plot[{Sqrt[x], -Sqrt[x]}, {x, 0, xf}, Axes -> {False, True},
Epilog -> {Opacity[.4], Purple,
Line /@ Flatten[
Outer[List, Table[{n^2, n}, {n, 2, np}],
Table[{n^2, -n}, {n, 2, np}], 1], 1],
Opacity[1], {Black,
Text[#, {#, 0}] & /@
Complement[Range[np], Table[Prime[n], {n, np}]]}, Red,
PointSize[.01],
Table[Tooltip[Point@{Prime[n], 0}, Prime[n]], {n, np}],
Table[Tooltip[Point@{n^2, n}, n], {n, 2, np}],
Table[Tooltip[Point@{n^2, -n}, n], {n, 2, np}]},
ImageSize -> 600]],
{{xf, 9, "x"}, 4, 50, Appearance -> "Labeled"}]