login
A056898
a(n) = smallest number m such that m^2+n is prime.
7
1, 0, 0, 1, 0, 1, 0, 3, 2, 1, 0, 1, 0, 3, 2, 1, 0, 1, 0, 3, 4, 1, 0, 7, 2, 9, 2, 1, 0, 1, 0, 3, 2, 3, 6, 1, 0, 3, 2, 1, 0, 1, 0, 3, 4, 1, 0, 5, 2, 3, 4, 1, 0, 5, 2, 9, 2, 1, 0, 1, 0, 3, 2, 3, 6, 1, 0, 9, 2, 1, 0, 1, 0, 3, 2, 5, 6, 1, 0, 3, 4, 1, 0, 5, 2, 9, 4, 1, 0, 7, 4, 3, 2, 3, 6, 1, 0, 3, 2
OFFSET
1,8
LINKS
FORMULA
a(n) = sqrt(A056896(n)-n) = sqrt(A056897(n)).
For p a prime: a(p) = 0 (and a(p-1) = 1 if p<>3).
EXAMPLE
a(8) = 3 since 3^2+8 = 17 which is prime.
PROG
(PARI) A056898(n) = { my(m=0); while(!isprime((m*m)+n), m++); (m); }; \\ Antti Karttunen, Mar 04 2018
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jul 05 2000
STATUS
approved