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.

A054546 First differences of nonprimes (including 0 and 1, A002808).

Original entry on oeis.org

1, 3, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2
Offset: 1

Views

Author

G. L. Honaker, Jr., Apr 09 2000

Keywords

Comments

Sum of first n terms equals n-th nonprime number.
First differences of A141468. - Omar E. Pol, Oct 21 2011

Crossrefs

Programs

  • Mathematica
    t=Flatten[Position[Table[PrimeQ[w], {w, 2, 256}], False]]+1 Delete[t-RotateRight[t], 1]
    Differences[Select[Range[0,200],!PrimeQ[#]&]] (* Harvey P. Dale, May 27 2018 *)

Formula

a(n) = A018252(n) - A141468(n). - Omar E. Pol, Oct 21 2011

Extensions

More terms from James Sellers, Apr 11 2000