The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A359582 a(n) is the least prime > a(n-2) such that a(n-1)+a(n) is a square. 1
2, 2, 7, 29, 71, 73, 251, 149, 751, 1013, 1103, 1201, 2399, 1697, 2659, 4397, 2999, 5101, 5303, 6361, 8039, 8861, 8563, 15773, 11783, 17117, 13159, 30941, 25703, 35801, 26699, 49477, 30047, 51749, 34687, 55313, 39551, 57793, 43331, 59069, 47207, 71129, 62827, 75557, 64319, 83137, 68963, 84701, 83399 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For n > 2, a(n) == (-1)^n (mod 4).
LINKS
Robert Israel, Plot of first differences a(n)-a(n-1), odd n in blue, even n in red
EXAMPLE
a(4) = 29 because a(3) + 29 = 6^2 is a square and 29 is the first prime greater than a(2) = 2 that works.
MAPLE
A[1]:= 2: A[2]:= 2: s:= 2:
for i from 3 to 100 do
for s from s+1 while not isprime(s^2 - A[i-1]) do od:
A[i]:= s^2 - A[i-1];
od:
seq(A[i], i=1..100);
CROSSREFS
Sequence in context: A138802 A292016 A350020 * A047003 A067352 A240978
KEYWORD
nonn,look
AUTHOR
Robert Israel, Jan 08 2023
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 June 4 21:34 EDT 2024. Contains 373102 sequences. (Running on oeis4.)