OFFSET
1,1
FORMULA
EXAMPLE
n=7: a(7)=127 because 127-113=14=2.7 and 121=11 is between {127,113} closest primes to 121 a suitable square number. Also 127 is the smallest prime with this property.
MATHEMATICA
pre[x_ := Prime[PrimePi[x]] nex[x_ := Prime[PrimePi[x]+1] de[x_ := Prime[PrimePi[x]+1]-Prime[PrimePi[x]] t=Table[de[w^2], {w, 1, 50000}]; mt=Table[Min[Flatten[Position[t, 2*j]]], {j, 1, 100}] Table[nex[Part[mt, j]^2], {j, 1, Length[mt]}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 09 2004
STATUS
approved