OFFSET
1,1
EXAMPLE
a(3) = 1 because 6*3+1 is prime;
a(4) = 0 since 6*4+1 is composite.
MATHEMATICA
If[PrimeQ[6#+1], 1, 0]&/@Range[120] (* Harvey P. Dale, Apr 03 2012 *)
PROG
(PARI) a(n) = isprime(6*n+1); \\ Michel Marcus, Jan 19 2019
(Magma) [IsPrime(6*n+1) select 1 else 0:n in [1..105]]; // Marius A. Burtea, Oct 06 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Washington Bomfim, Oct 27 2009
STATUS
approved