login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A167021 a(n) = 1 iff 6n+1 is prime. 4
1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Cf. A024899, A167020, A132350. For n < 14, a(n) = A132350(n).
Sequence in context: A219009 A353519 A267708 * A267687 A304653 A132350
KEYWORD
nonn
AUTHOR
Washington Bomfim, Oct 27 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 25 07:38 EDT 2024. Contains 373697 sequences. (Running on oeis4.)