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.

A099618 a(n) = 1 if the n-th prime == 1 mod 6, otherwise a(n) = 0.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1
Offset: 1

Views

Author

Joseph Biberstine (jrbibers(AT)indiana.edu), Nov 19 2004

Keywords

Crossrefs

Characteristic function of A091178.

Programs

  • Mathematica
    Table[Mod[Mod[Mod[Mod[Prime[k], 6], 5], 3], 2], {k, 1, 120}]
    a[n_] := Boole[Mod[Prime[n], 6] == 1]; Array[a, 120] (* Amiram Eldar, Mar 14 2025 *)
  • PARI
    a(n) = (prime(n) % 6) == 1; \\ Michel Marcus, Jun 26 2019

Formula

From Amiram Eldar, Mar 14 2025: (Start)
a(n) = 1 - A132194(m).
Sum_{k=1..n} a(k) ~ n / 2. (End)