login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062064 a(1) = 2; a(n) is the smallest prime > a(n-1) such that a(n) + a(n-1) is a square. 6
2, 7, 29, 71, 73, 251, 773, 827, 937, 1367, 1549, 5507, 7489, 8387, 8513, 10531, 11969, 16931, 18413, 18451, 20753, 21683, 24113, 25171, 26813, 27011, 29633, 33871, 63473, 76403, 77261, 89203, 222161, 229423, 254993, 266291, 278353 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A181758 A285790 A083016 * A158024 A166940 A166939
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Jun 12 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jun 21 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 17:43 EDT 2024. Contains 372175 sequences. (Running on oeis4.)