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.

A054541 Sum of first n terms equals n-th prime.

Original entry on oeis.org

2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6
Offset: 1

Views

Author

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

Keywords

Comments

Except for first term, same as A001223.
First differences of A182986. - Omar E. Pol, Oct 31 2013
A075526 is 1 together with A001223. This is 2 together with A001223. A125266 is 3 together with A001223. - Omar E. Pol, Nov 01 2013
Convolved with A024916 gives A086718. - Omar E. Pol, Dec 23 2021

Crossrefs

Partial sums give A000040.

Programs

  • Mathematica
    Join[{2},Differences[Prime[Range[100]]]] (* Paolo Xausa, Oct 25 2023 *)
  • PARI
    a(n) = if (n==1, 2, prime(n) - prime(n-1)); \\ Michel Marcus, Oct 31 2013

Extensions

More terms from James Sellers, Apr 11 2000