OFFSET
1,2
COMMENTS
LINKS
Jonathan Sondow and Robert G. Wilson v, Table of n, a(n) for n = 1..260
Stephan Baier and Liangyi Zhao, On Primes Represented by Quadratic Polynomials, Anatomy of Integers, CRM Proc. & Lecture Notes, Vol. 46, Amer. Math. Soc. 2008, pp. 169 - 166.
Étienne Fouvry and Henryk Iwaniec, Gaussian primes, Acta Arithmetica 79:3 (1997), pp. 249-287.
EXAMPLE
The primes p < prime(3) = 5 are p = 2 and 3. As 1^2 + 2^2 = 5, 2^2 + 3^2 = 13, and 3^2 + 2^2 = 13 are prime, a(3) >= 4. But 4^2 + 2^2 = 20 and 4^2 + 3^2 = 25 are not prime, while 4^2 + 5^2 = 41 is prime, so a(3) = 4.
MATHEMATICA
f[n_] := Block[{p = 2}, While[ !PrimeQ[n^2 + p^2], p = NextPrime@ p]; p]; t = 0*Range@ 300; t[[1]] = 1; k = 2; While[k < 50000001, p = f@ k; If[ t[[PrimePi@ p]] == 0, t[[PrimePi@ p]] = k; Print[{PrimePi@ p, p, k}]]; k += 2]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow and Robert G. Wilson v, Nov 02 2015
STATUS
approved