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.

A054763 Residues of consecutive prime differences modulo 6.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 4, 0, 2, 0, 4, 2, 4, 0, 0, 2, 0, 4, 2, 0, 4, 0, 2, 4, 2, 4, 2, 4, 2, 4, 0, 2, 4, 2, 0, 0, 4, 0, 0, 2, 4, 2, 4, 2, 0, 0, 4, 2, 4, 0, 2, 4, 0, 0, 0, 2, 0, 4, 2, 4, 2, 4, 2, 4, 2, 0, 4, 2, 4, 0, 2, 0, 0, 4, 0, 2, 4, 2, 4, 2, 4, 2, 0, 4, 0, 2, 4, 2, 4, 0, 2, 4, 2, 4, 0, 0, 2, 0, 0, 4, 0, 0, 2, 0
Offset: 1

Views

Author

Labos Elemer, May 17 2000

Keywords

Comments

For n>2, only the 0-residues may arise several times after each other, that is, there are no "2,2" and no "4,4". Let nz(k) denote the nonzero values of A054763(n). Then nz(0)=1, nz(1)=2, nz(2)=2, and nz(k+1)=6-nz(k) for k>1. Conjecture: the percentage of zeros in A054763(n) asymptotically runs to 50%. - Alex Ratushnyak, Apr 18 2012

Crossrefs

Cf. A001223.

Programs

  • Mathematica
    Mod[#, 6] & /@ Differences@ Prime@ Range@ 105 (* Michael De Vlieger, Mar 05 2017 *)
  • PARI
    a(n) = (prime(n+1) - prime(n)) % 6; \\ Michel Marcus, Dec 17 2013

Formula

a(n) = A001223(n) mod 6.