OFFSET
1,1
EXAMPLE
a(3)=1759 since 1759 = 676 + 3*361, 1753 = 25 + 3*576, 1747 = 1600 + 3*49, 1741 = 289 + 3*484 are all prime.
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[#] &]]; pos = Position[Partition[Differences[t], 3, 1], {1, 1, 1}, 1, 1] ; If[pos != {}, again = False; ans = Prime[t[[pos[[1, 1]] + 3]]], lim = 10*lim]]; ans, {n, 20}] (* T. D. Noe, May 23 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
John L. Drost, May 22 2012
STATUS
approved