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.

A060359 a(n) = (smallest prime > k) - (largest prime < k), where k = lcm(1..n).

Original entry on oeis.org

2, 2, 2, 2, 2, 14, 18, 18, 32, 32, 54, 54, 54, 40, 62, 62, 2, 2, 2, 2, 42, 42, 30, 30, 72, 72, 44, 44, 44, 42, 42, 42, 42, 42, 96, 96, 96, 96, 126, 126, 142, 142, 142, 142, 2, 2, 142, 142, 142, 142, 122, 122, 122, 122, 122, 122, 262, 262, 98, 98
Offset: 3

Views

Author

N. J. A. Sloane, Apr 01 2001

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (m->nextprime(m)-prevprime(m))(ilcm($1..n)):
    seq (a(n), n=3..100);
  • Mathematica
    f[n_]:=Module[{lcmn=LCM@@Range[n]}, NextPrime[lcmn]-NextPrime[lcmn,-1]]; f/@Range[3,70]  (* Harvey P. Dale, Feb 04 2011 *)
  • PARI
    a(n) = my(lc = lcm([1..n])); nextprime(lc+1) - precprime(lc-1); \\ Michel Marcus, Mar 20 2018

Formula

a(n) = A013633(A003418(n)). - Michel Marcus, Mar 20 2018