%I #24 Aug 21 2017 03:14:49
%S 1,121,144,256,400,484,784,961,1089,1156,1681,1764,1849,2116,2401,
%T 2704,3025,3364,3721,3844,4489,4624,4900,5041,5776,6241,6561,7056,
%U 8100,8281,8649,8836,9025,10000,10201,10404,11025,11236,12321,12544,13225,13924,14400
%N a(n) is the minimal m such that sqrt(m) - pi(sqrt(p_m)) >= n, where p_m is the m-th prime.
%C All terms are squares.
%H G. C. Greubel, <a href="/A182072/b182072.txt">Table of n, a(n) for n = 1..1000</a>
%F 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.
%e 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.
%t Module[{last = 1},Table[last = NestWhile[#1 + 1 &, last, Sqrt[#1] - PrimePi[Floor[Sqrt[Prime[#1]]]] < n &], {n, 1, 55}]]
%Y Cf. A000040, A000290.
%K nonn
%O 1,2
%A _Vladimir Shevelev_ and _Peter J. C. Moses_, Apr 10 2012