OFFSET
3,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 3..1020
FORMULA
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 *)
PROG
(PARI) a(n) = my(lc = lcm([1..n])); nextprime(lc+1) - precprime(lc-1); \\ Michel Marcus, Mar 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 01 2001
STATUS
approved