OFFSET
1,2
COMMENTS
The corresponding primes are 2, 11, 47, 191, 1091, 4007, 7607, 12791, 27191, 43067, ...
EXAMPLE
a(1) = 1 because 1 + 1^2 = 2 is prime;
a(2) = 3 because 1 + 1^2 + 2^2 = 6 is not prime, but 1 + 1^2 + 3^2 = 11 is prime;
a(3) = 6 because neither 1 + 1^2 + 3^2 + 4^2 = 27 nor 1 + 1^2 + 3^2 + 5^2 = 36 is prime, but 1 + 1^2 + 3^2 + 6^2 = 47 is prime.
MATHEMATICA
p=1; lst={p}; Do[If[PrimeQ[p+n^2], AppendTo[lst, n]; p=p+n^2], {n, 1, 1500}]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 24 2012
STATUS
approved