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.

A141042 Product of n and the n-th gap between primes: a(n) = n*A001223(n).

Original entry on oeis.org

1, 4, 6, 16, 10, 24, 14, 32, 54, 20, 66, 48, 26, 56, 90, 96, 34, 108, 76, 40, 126, 88, 138, 192, 100, 52, 108, 56, 116, 420, 124, 192, 66, 340, 70, 216, 222, 152, 234, 240, 82, 420, 86, 176, 90, 552, 564, 192, 98, 200, 306, 104
Offset: 1

Views

Author

Omar E. Pol, Jul 30 2008

Keywords

Comments

a(n) is also the area under the curve of the function pi(x) from prime(n) to prime(n+1), see the illustration of initial terms. This sequence is also the first differences of A152535. - Omar E. Pol, Nov 13 2013

Examples

			a(5)=10 because the 5th prime is 11 and the 6th prime is 13. The 5th gap between primes is 2, then a(5)=5*2=10.
		

Crossrefs

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..1001)]:
    seq(n*(P[n+1]-P[n]),n=1..1000); # Robert Israel, Nov 26 2015
  • Mathematica
    Table[n*(Prime[n+1] - Prime[n]), {n, 100}] (* T. D. Noe, Nov 14 2013 *)
    With[{nn=60},Times@@@Thread[{Range[nn],Differences[Prime[Range[nn+1]]]}]] (* Harvey P. Dale, Dec 18 2018 *)
  • PARI
    diff(v)=vector(#v-1, i, (v[i+1]-v[i])*i);
    diff(primes(100)) \\ Altug Alkan, Nov 26 2015

Formula

a(n) = n*(A000040(n+1)-A000040(n)) = n*A001223(n).
a(n) = n*(1 + A046933(n)). [Omar E. Pol, Nov 16 2008]

Extensions

Corrected definition and example. - Omar E. Pol, Nov 16 2008
Name and example corrected by Bob Selcoe and Robert Israel, Nov 26 2015