proposed
approved
Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
proposed
approved
editing
proposed
Robert Israel, <a href="/A249567/b249567.txt">Table of n, a(n) for n = 1..3310</a>
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
approved
editing
proposed
approved
editing
proposed
editing
proposed
lst={1}; n=2; While[n<10^5, If[n^2-Total[lst]>0&&PrimeQ[n^2-Total[lst]], AppendTo[lst, n^2]]; n++];
lst (* Ivan N. Ianakiev, Nov 03 2014 *)
approved
editing
editing
approved