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)

A109579 Sum([pi(j+1)-pi(j)][prime(j+1)-prime(j)],j=1..n), where pi(k) is the number of prime numbers less than or equal to k and prime(k) is the k-th prime.

Original entry on oeis.org

1, 3, 3, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 23, 23, 29, 29, 29, 29, 33, 33, 33, 33, 33, 33, 35, 35, 49, 49, 49, 49, 49, 49, 55, 55, 55, 55, 61, 61, 71, 71, 71, 71, 83, 83, 83, 83, 83, 83, 85, 85, 85, 85, 85, 85, 91, 91, 93, 93, 93, 93, 93, 93, 107, 107, 107, 107, 111
Offset: 1

Views

Author

Roger L. Bagula, Jun 29 2005

Keywords

Examples

			a(2)=3 because pi(1)=0,p(2)=1,p(3)=2,prime(1)=2,prime(2)=3,prime(3)=5 and so a(2)=(1-0)(3-2)+(2-1)(5-3)=1+2=3.
		

Crossrefs

Partial sums of A109578.

Programs

  • Maple
    with(numtheory): a:=n->sum((pi(k+1)-pi(k))*(ithprime(k+1)-ithprime(k)),k=1..n): seq(a(n),n=1..70);
  • Mathematica
    an = Table[(PrimePi[n + 1] - PrimePi[n])*(Prime[n + 1] - Prime[n]), {n, 1, 200}] a[0] = 0; a[n_] := a[n] = a[n - 1] + an[[n]] aa = Table[a[n], {n, 0, Length[an]}]
Showing 1-2 of 2 results.