OFFSET
1,1
EXAMPLE
5^2+4*1^2=29, 281^2+4*2^2=78977, 461^2 + 4*3^2=212557 (all prime).
MATHEMATICA
Table[p = 2; While[NextPrime[p^2] != p^2 + 4 n^2, p = NextPrime@ p]; p, {n, 8}] (* Michael De Vlieger, Apr 22 2017 *)
PROG
(PARI) a(n) = {forprime(p=2, , if (nextprime(p^2+1) == p^2 + 4*n^2, return (p)); ); } \\ Michel Marcus, Apr 19 2017
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Zak Seidov, Apr 18 2017
EXTENSIONS
a(13)-a(15) from Rémy Sigrist, Apr 28 2017
STATUS
approved