OFFSET
1,1
EXAMPLE
a(1)=17 since 17 = 4^2 + 1^2. 13 = 3^2 + 2^2 and these are the smallest consecutive primes that are the sum of two squares.
MATHEMATICA
Table[again = True; lim = 10; While[again, lim2 = lim/Sqrt[n]; t = PrimePi[Select[Union[Flatten[Table[x^2 + n y^2, {x, 0, lim}, {y, 0, lim2}]]], # < lim^2 && PrimeQ[#] &]]; i = 1; While[i < Length[t] && t[[i]] + 1 < t[[i+1]], i++]; If[i < Length[t], again = False; ans = Prime[t[[i+1]]], lim = 10*lim]]; ans, {n, 60}] (* T. D. Noe, May 23 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
John L. Drost, May 22 2012
STATUS
approved