A246760 a(1) = 5; a(n) for n > 1 is the smallest prime > a(n-1) that differs from a(n-1) by a square.
5, 41, 617, 653, 797, 941, 977, 1013, 1049, 1193, 1229, 1373, 1409, 1553, 1697, 1733, 1877, 1913, 1949, 2273, 2309, 2633, 2777, 3677, 3821, 4397, 4721, 5297, 5333, 5477, 5801, 6701, 6737, 8501, 8537, 8573, 8609, 8753, 11057, 11093, 13397, 13721, 13757, 13901, 18257, 18401, 19301, 20201, 21101, 22397, 22433, 22469, 22613, 22937, 22973, 23117, 24413, 24989
Offset: 1
Keywords
Examples
41 - 5 = 6^2, 617 - 41 = 24^2, 653 - 617 = 6^2.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
sps[n_]:=Module[{p=NextPrime[n]},While[!IntegerQ[Sqrt[p-n]],p= NextPrime[ p]];p]; NestList[sps,5,60] (* Harvey P. Dale, Jul 28 2016 *)
-
PARI
print1(p=5",");for(k=1,100,x=1;while(!isprime(q=p+36*x^2),x=x+1);print1(q",");p=q)
Comments