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.

Showing 1-2 of 2 results.

A096500 Let f(n) = smallest prime > n; a(n) = f(n+1) - f(n).

Original entry on oeis.org

1, 2, 0, 2, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0
Offset: 1

Views

Author

Labos Elemer, Jul 09 2004

Keywords

Crossrefs

First differences of A151800.
Cf. also A109578.

Programs

Formula

From Antti Karttunen, Jan 03 2019: (Start)
a(n) = A151800(n+1) - A151800(n).
a(n) = A010051(1+n) * A001223(A000720(1+n)).
(End)

A109578 a(n) = (pi(n+1)-pi(n)) * (prime(n+1)-prime(n)), where pi(k) is the number of prime numbers less than or equal to k (= A000720(k)) and prime(k) is the k-th prime number (= A000040(k)).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Jun 29 2005

Keywords

Crossrefs

Cf. also A096500, A096501.

Programs

  • Maple
    with(numtheory): a:=n->(pi(n+1)-pi(n))*(ithprime(n+1)-ithprime(n)): seq(a(n),n=1..160);
  • Mathematica
    an = Table[(PrimePi[n + 1] - PrimePi[n])*(Prime[n + 1] - Prime[n]), {n, 1, 200}]
  • PARI
    A109578(n) = ((primepi(n+1)-primepi(n)) * (prime(n+1)-prime(n))); \\ Antti Karttunen, Jan 03 2019

Formula

a(n) = (A010051(1+n) * A001223(n)). - Antti Karttunen, Jan 03 2019
Showing 1-2 of 2 results.