OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..3310
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Nov 01 2014
STATUS
approved