login
A056896
Smallest prime which can be written as k^2 + n for k >= 0.
4
2, 2, 3, 5, 5, 7, 7, 17, 13, 11, 11, 13, 13, 23, 19, 17, 17, 19, 19, 29, 37, 23, 23, 73, 29, 107, 31, 29, 29, 31, 31, 41, 37, 43, 71, 37, 37, 47, 43, 41, 41, 43, 43, 53, 61, 47, 47, 73, 53, 59, 67, 53, 53, 79, 59, 137, 61, 59, 59, 61, 61, 71, 67, 73, 101, 67, 67, 149, 73, 71
OFFSET
1,1
FORMULA
a(n) = A056897(n)+n = A056898(n)^2+n.
For p a prime: a(p)=p (and a(p-1)=p if p<>3).
EXAMPLE
a(8)=17 because 17=3^2+8.
MATHEMATICA
Table[k = 0; While[p = n + k^2; ! PrimeQ[p], k++]; p, {n, 100}] (* T. D. Noe, Apr 01 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jul 05 2000
EXTENSIONS
Example corrected by Harvey P. Dale, Apr 01 2011
STATUS
approved