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.

A060361 a(n) = { Smallest prime > k } - k, where k = lcm(1..n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 13, 13, 31, 31, 31, 23, 19, 19, 1, 1, 1, 1, 41, 41, 1, 1, 31, 31, 43, 43, 1, 41, 41, 41, 41, 41, 53, 53, 53, 53, 79, 79, 59, 59, 59, 59, 1, 1, 59, 59, 59, 59, 61, 61, 61, 61, 61, 61, 113, 113, 97, 97, 97, 179, 179, 179, 73
Offset: 0

Views

Author

N. J. A. Sloane, Apr 01 2001

Keywords

Programs

  • Mathematica
    f[n_]:=Module[{lcm=LCM@@Range[n]},NextPrime[lcm]-lcm]; Join[{1}, Array[f,70]] (* Harvey P. Dale, May 20 2011 *)
  • PARI
    a(n) = my(lc = lcm([1..n])); nextprime(lc+1) - lc; \\ Michel Marcus, Mar 18 2018