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.

A096501 Difference between primes preceding n+1 and n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 09 2004

Keywords

Comments

Values a(1) = 0 and a(2) = 4 are based on convention in Mathematica-language that PreviousPrime(1) = PreviousPrime(2) = -2. - Antti Karttunen, Jan 03 2019

Crossrefs

Programs

Formula

For n > 2, a(n) = A010051(n) * A001223(A000720(n)-1) = A136548(1+n)-A136548(n). - Antti Karttunen, Jan 03 2019
a(n) = A007917(n) - A007917(n-1), for n > 2. - Ridouane Oudra, Oct 05 2024

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.