login
A355449
a(n) = 1 if n^2 + 2 is prime, 0 otherwise.
2
1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0
OFFSET
0
FORMULA
a(n) = A010051(A059100(n)).
MATHEMATICA
a[n_] := If[PrimeQ[n^2 + 2], 1, 0]; Array[a, 100, 0] (* Amiram Eldar, Jul 12 2022 *)
PROG
(PARI) A355449(n) = isprime(2+(n^2));
(Python)
from sympy import isprime
def A355449(n): return int(isprime(n**2+2)) # Chai Wah Wu, Jul 13 2022
CROSSREFS
Characteristic function of A067201.
Cf. also A295405.
Sequence in context: A267537 A329670 A183919 * A058840 A266155 A262683
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 12 2022
STATUS
approved