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.

A331677 a(n) is the difference between the number of primes smaller than prime(n) (i.e., n-1) and greater than prime(n) but less than 2*prime(n).

Original entry on oeis.org

-1, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 2, 3, 4, 5, 4, 3, 5, 5, 5, 7, 6, 7, 7, 5, 5, 7, 8, 10, 11, 7, 8, 7, 8, 7, 9, 8, 9, 10, 11, 10, 11, 10, 11, 12, 13, 11, 9, 10, 11, 11, 12, 13, 12, 12, 12, 14, 15, 16, 17, 18, 17, 13, 13, 15, 16, 12, 13, 12, 14, 15, 16, 15, 15
Offset: 1

Views

Author

Todor Szimeonov, Jan 24 2020

Keywords

Crossrefs

Programs

  • PARI
    a(n) = 2*n - 1 - primepi(2*prime(n)); \\ Michel Marcus, Feb 02 2020

Formula

a(n) = (2*n-1) - A020900(n). - Michel Marcus, Feb 02 2020
a(n) = n - 1 - A070046(n). - M. F. Hasler, Feb 29 2020
a(n) = A334051(n) - 1. - Alois P. Heinz, Oct 09 2020