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.
%I A058018 #19 Aug 13 2024 05:30:33 %S A058018 1,1,1,1,1,1,13,1,13,31,23,19,1,41,1,31,43,1,41,53,79,59,1,59,61,113, %T A058018 97,179,73,73,97,103,101,109,1,229,109,139,113,227,131,191,163,1,199, %U A058018 151,139,1,223,229,367,239,499,251,509,251,227,373,281,233,283,229,277,263 %N A058018 Difference between LCM(1,...,x) and the smallest prime > LCM(1,...,x), where x is the n-th prime power (A000961). %C A058018 The first value corresponds to x = 1, LCM(1) = 1. %C A058018 For the first 100 prime powers, the value is either prime or 1. %C A058018 The values of x are taken to be prime powers so that each distinct LCM occurs exactly once. %F A058018 a(n) = A013632(A051451(n)) = A058017(n) - A051451(n). - _Amiram Eldar_, Aug 13 2024 %e A058018 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. %t A058018 With[{max = 250}, (NextPrime[#] - #)& /@ Exp[Accumulate[Join[{0}, Select[Array[MangoldtLambda, max], # > 0 &]]]]] (* _Amiram Eldar_, Aug 13 2024 *) %o A058018 (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 %Y A058018 Cf. A000961, A003418, A013632, A051451, A058017. %K A058018 nonn %O A058018 1,7 %A A058018 _Labos Elemer_, Nov 14 2000 %E A058018 Edited by _Franklin T. Adams-Watters_, Aug 15 2006 %E A058018 Offset set to 1 by _Michel Marcus_, Apr 09 2015 %E A058018 Name corrected by _Amiram Eldar_, Aug 13 2024