login
A102609
a(n) = 1 iff n^2-n+41 is prime (else 0).
0
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0
OFFSET
0
LINKS
Eric Weisstein's World of Mathematics, Prime-Generating Polynomial.
EXAMPLE
a(39) = 1 because 39^2 - 39 + 41 = 1523 is prime.
MATHEMATICA
Table[If[PrimeQ[n^2 - n + 41], 1, 0], {n, 1, 150}]
PROG
(PARI) a(n) = isprime(n^2-n+41); \\ Michel Marcus, Mar 08 2023
CROSSREFS
Sequence in context: A015526 A016182 A015936 * A015772 A016288 A016030
KEYWORD
nonn
AUTHOR
Joseph Biberstine (jrbibers(AT)indiana.edu), Jan 29 2005
EXTENSIONS
a(0) = 1 prepended by Michel Marcus, Mar 08 2023
STATUS
approved