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-1 of 1 results.

A291463 a(n) is the product of n-th prime number with the distance to the next prime.

Original entry on oeis.org

2, 6, 10, 28, 22, 52, 34, 76, 138, 58, 186, 148, 82, 172, 282, 318, 118, 366, 268, 142, 438, 316, 498, 712, 388, 202, 412, 214, 436, 1582, 508, 786, 274, 1390, 298, 906, 942, 652, 1002, 1038, 358, 1810, 382, 772, 394, 2388, 2532, 892, 454, 916, 1398, 478, 2410
Offset: 1

Views

Author

Dimitris Valianatos, Aug 24 2017

Keywords

Examples

			For n = 6 prime(6) = 13, prime(7) = 17 the gap is 17 - 13 = 4. So 13 * 4 = 52 and 52 is the sixth term.
		

Crossrefs

Programs

  • Mathematica
    Array[With[{p = Prime@ #}, p (NextPrime[p] - p)] &, 50] (* Michael De Vlieger, Sep 03 2017 *)
    Module[{nn=60,dnp},dnp=Differences[Prime[Range[nn+1]]];Times@@@Thread[ {Prime[Range[nn]],dnp}]] (* Harvey P. Dale, Mar 24 2022 *)
  • PARI
    forprime(p=2,200, print1(p*nextprime(p+1)-p^2, ", "))

Formula

a(n) = prime(n)*(prime(n+1) - prime(n)).
a(n) = A000040(n)*A001223(n). - Michel Marcus, Aug 25 2017
Showing 1-1 of 1 results.