OFFSET
3,9
MATHEMATICA
Min[NextPrime[#]-#, #-NextPrime[#, -1]]&/@Table[LCM@@Range[n], {n, 80}] (* Harvey P. Dale, Jan 01 2019 *)
PROG
(PARI) a(n) = my(lcn = lcm([1..n])); min(nextprime(lcn+1)-lcn, lcn-precprime(lcn-1)); \\ Michel Marcus, Mar 29 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 01 2001
EXTENSIONS
Definition corrected by Jon E. Schoenfield, Mar 18 2018
STATUS
approved