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.

A058044 Difference between the smallest prime following and largest prime preceding n-th primorial number.

Original entry on oeis.org

2, 2, 12, 2, 18, 48, 46, 80, 102, 74, 120, 72, 136, 174, 132, 168, 198, 190, 230, 176, 234, 286, 102, 354, 364, 336, 278, 486, 442, 386, 408, 1032, 520, 308, 364, 612, 478, 432, 382, 422, 606, 526, 1344, 606, 1230, 834, 624, 756, 550
Offset: 2

Views

Author

Labos Elemer, Nov 17 2000

Keywords

Crossrefs

Programs

  • Maple
    [seq(nextprime(product(ithprime(k), k=1..w))-prevprime (product(ithprime(k), k=1..w)), w=2..50)];
  • Mathematica
    Rest[NextPrime[#]-NextPrime[#,-1]&/@Rest[FoldList[Times,1,Prime[Range[ 50]]]]] (* Harvey P. Dale, Mar 24 2013 *)

Formula

a(n) = A038710(n)-A007014(n).

Extensions

Offset corrected by Alois P. Heinz, Jun 08 2014