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.

A080378 Residues mod 4 of the n-th difference between consecutive primes.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 04 2003

Keywords

Crossrefs

Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Mathematica
    Table[Mod[Prime[w+1]-Prime[w], 4], {w, 1, 256}]
    Mod[Differences[Prime[Range[200]]], 4] (* Zak Seidov, Jun 26 2015 *)
  • Python
    from sympy import prime
    def A080378(n): return (prime(n+1)-prime(n))&3 # Chai Wah Wu, Jul 07 2022

Formula

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