cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A167021 a(n) = 1 iff 6n+1 is prime.

Original entry on oeis.org

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
Offset: 1

Views

Author

Washington Bomfim, Oct 27 2009

Keywords

Examples

			a(3) = 1 because 6*3+1 is prime;
a(4) = 0 since 6*4+1 is composite.
		

Crossrefs

Cf. A024899, A167020, A132350. For n < 14, a(n) = A132350(n).

Programs

  • Magma
    [IsPrime(6*n+1) select 1 else 0:n in [1..105]]; // Marius A. Burtea, Oct 06 2019
  • Mathematica
    If[PrimeQ[6#+1],1,0]&/@Range[120] (* Harvey P. Dale, Apr 03 2012 *)
  • PARI
    a(n) = isprime(6*n+1); \\ Michel Marcus, Jan 19 2019