OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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.
E.W. Weisstein, Fermat's 4n+1 Theorem, MathWorld.
Wikipedia, Bunyakovsky's conjecture
FORMULA
a(n) == 1 (mod 4) if a(n) > 0.
a(n) > 0 if Bunyakovsky's conjecture is true.
a(n) <> a(m) if n <> m and a(n) > 0, by uniqueness in Fermat's 4n+1 Theorem.
a(n) = prime(n)^2 + A240131(n)^2 if a(n) > 0.
EXAMPLE
Prime(2) = 3 and 3^2 + 1^2 = 10 is not prime but 3^2 + 2^2 = 13 is prime, so a(2) = 13.
MAPLE
g:= proc(p) local k; for k from 2 by 2 do if isprime(p^2 + k^2) then return p^2+k^2 fi od end proc:
g(2):= 5:
seq(g(ithprime(i)), i=1..1000); # Robert Israel, Nov 04 2015
MATHEMATICA
Table[First[Select[Prime[n]^2 + Range[20]^2, PrimeQ]], {n, 40}]
PROG
(PARI) a(n) = {p = prime(n); k = 1 - p%2; inc = 2; while (!isprime(q=p^2+k^2), k += inc); q; } \\ Michel Marcus, Nov 04 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Apr 07 2014
STATUS
approved