OFFSET
1,2
COMMENTS
All terms are squares.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n)~n^2 as n tends to infinity. Indeed, by the PNT, we have pi(sqrt(p_m)) ~ 2*sqrt(p_m)/log(p_m) ~ 2*sqrt(m*log(m))/log(m)=2*sqrt(m/log(m)). Thus, if sqrt(m)-2*sqrt(m/log(m)) = sqrt(m)*(1-2/sqrt(log(m))) = n, then m ~ n^2.
EXAMPLE
a(2)=121, since p_121 = 661 and sqrt(121)-pi(sqrt(661)) = 11- pi(25) = 11 - 9 = 2, while p_120 = 659 and sqrt(120)-pi(sqrt(659)) = sqrt(120)-9 < 2.
MATHEMATICA
Module[{last = 1}, Table[last = NestWhile[#1 + 1 &, last, Sqrt[#1] - PrimePi[Floor[Sqrt[Prime[#1]]]] < n &], {n, 1, 55}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev and Peter J. C. Moses, Apr 10 2012
STATUS
approved