login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A276556
a(n) = smallest prime p such that (smallest prime > p^2) == p^2 + 4n^2, n>=1.
0
5, 281, 461, 4937, 25367, 75997, 1193909, 3464389, 48591863, 23674667, 22486333, 1648510979, 12708853771, 25139472583, 53498475287
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
Sequence in context: A057209 A216662 A203521 * A283569 A252173 A265966
KEYWORD
nonn,more
AUTHOR
Zak Seidov, Apr 18 2017
EXTENSIONS
a(13)-a(15) from Rémy Sigrist, Apr 28 2017
STATUS
approved