OFFSET
1,1
LINKS
Harry J. Smith and Zak Seidov, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
EXAMPLE
The next term after 7 is 29 as 7 + 29 = 36 = 6^2.
MATHEMATICA
nxt[n_]:=Module[{np=NextPrime[n]}, While[!IntegerQ[Sqrt[n+np]], np = NextPrime[ np]]; np]; NestList[nxt, 2, 40] (* Harvey P. Dale, Apr 28 2013 *)
NestList[(n=Floor[Sqrt[2*#]]+1; While[!PrimeQ[q=n^2-#], n++]; q)&, 2, 30](* Zak Seidov, Feb 15 2017 *)
PROG
(PARI) { a=2; for (n=1, 1000, a1=a; if (n>1, until (issquare(a + a1), a=nextprime(a + 1))); write("b062064.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 31 2009
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Jun 12 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jun 21 2001
STATUS
approved