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”).

A295405
a(n) = 1 if n^2+1 is prime, 0 otherwise.
3
1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 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, 1
OFFSET
1
COMMENTS
It is conjectured that n^2+1 is prime infinitely often.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000 (first 10000 terms from Simon Plouffe)
FORMULA
a(n) = A010051(A002522(n)). - Robert Israel, Nov 22 2017
EXAMPLE
With n=1, a(1) = 2, n=2, a(2) = 5, a(3) = 0 since 10 is not prime.
MAPLE
seq(`if`(isprime(n^2+1), 1, 0), n=1..100); # Robert Israel, Nov 22 2017
MATHEMATICA
Boole[PrimeQ[Range[150]^2+1]] (* Paolo Xausa, Feb 23 2024 *)
PROG
(PARI) a(n)=isprime(n^2+1)
CROSSREFS
Characteristic function of A005574.
Cf. also A355449.
Sequence in context: A323509 A197183 A357382 * A267001 A141735 A343999
KEYWORD
nonn
AUTHOR
Simon Plouffe, Nov 22 2017
EXTENSIONS
Data section extended up to term a(120) by Antti Karttunen, Jul 12 2022
STATUS
approved