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.

A060360 a(n) = k - (largest prime < k), where k = lcm(1..n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 17, 17, 19, 19, 23, 23, 23, 17, 43, 43, 1, 1, 1, 1, 1, 1, 29, 29, 41, 41, 1, 1, 43, 1, 1, 1, 1, 1, 43, 43, 43, 43, 47, 47, 83, 83, 83, 83, 1, 1, 83, 83, 83, 83, 61, 61, 61, 61, 61, 61, 149, 149, 1, 1, 1, 97, 97, 97, 89, 89, 89, 89, 109, 109
Offset: 3

Views

Author

N. J. A. Sloane, Apr 01 2001

Keywords

Crossrefs

Programs

  • Mathematica
    lcmp[n_]:=Module[{c=LCM@@Range[n]},c-NextPrime[c,-1]]; Array[lcmp,80,3] (* Harvey P. Dale, Dec 22 2012 *)
  • PARI
    a(n) = my(lc = lcm([1..n])); lc - precprime(lc-1); \\ Michel Marcus, Mar 20 2018

Formula

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