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!)
A249567 a(1)=1; thereafter a(n) = smallest square m^2 such that m^2 minus (sum of all previous terms) is prime. 2
1, 4, 16, 64, 144, 576, 1296, 3600, 6084, 15876, 28224, 82944, 147456, 298116, 627264, 1218816, 2433600, 4928400, 9809424, 19607184, 39237696, 78535044, 158155776, 316057284, 633830976, 1265509476, 2532303684, 5062891716, 10128007044, 20260106244, 40519274436, 81043841124 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
16 - (1+4) = 11 (prime), 64 - (1+4+16) = 43 (prime).
MAPLE
A[1]:= 1: S:= 1:
for n from 2 to 100 do
m0:= ceil(sqrt(2+S));
if m0::odd then m0:= m0+1 fi;
for m from m0 by 2 do
if isprime(m^2 - S) then
A[n]:= m^2;
S:= S + A[n];
break
fi
od
od:
seq(A[i], i=1..100); # Robert Israel, Nov 14 2016
MATHEMATICA
A249567 = {1}; n = 2; While[n < 10^5, If[n^2 - Total[A249567] > 0 && PrimeQ[n^2 - Total[A249567]], AppendTo[A249567, n^2]]; n++]; A249567 (* Ivan N. Ianakiev, Nov 03 2014 *)
CROSSREFS
Sequence in context: A328850 A330687 A027676 * A348906 A177398 A343200
KEYWORD
nonn
AUTHOR
Zak Seidov, Nov 01 2014
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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)