OFFSET
1,7
COMMENTS
The first value corresponds to x = 1, LCM(1) = 1.
For the first 100 prime powers, the value is either prime or 1.
The values of x are taken to be prime powers so that each distinct LCM occurs exactly once.
FORMULA
EXAMPLE
The 6th distinct prime power is A000961(7) = 8, LCM(1,...,8) = 840 and 853 is the first prime that follows, thus a(7) = 853-840 = 13.
MATHEMATICA
With[{max = 250}, (NextPrime[#] - #)& /@ Exp[Accumulate[Join[{0}, Select[Array[MangoldtLambda, max], # > 0 &]]]]] (* Amiram Eldar, Aug 13 2024 *)
PROG
(PARI) lista(nn) = {for (n=1, nn, if ((n==1) || isprimepower(n), v = lcm(vector(n, x, x)); print1(nextprime(v+1) - v, ", ")); ); } \\ Michel Marcus, Apr 09 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 14 2000
EXTENSIONS
Edited by Franklin T. Adams-Watters, Aug 15 2006
Offset set to 1 by Michel Marcus, Apr 09 2015
Name corrected by Amiram Eldar, Aug 13 2024
STATUS
approved