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 A058022 #15 Nov 20 2015 11:41:11 %S A058022 3,4,1,1,1,1,1,17,19,23,17,43,1,1,29,41,1,43,1,43,47,83,1,83,61,149,1, %T A058022 97,89,109,113,103,113,89,137,1,157,181,239,139,241,139,179,233,193, %U A058022 163,241,173,283,167,271,193,277,181,179,199,1,193,223,239,239,233,751 %N A058022 Difference between lcm(1,..,n) and the largest prime before lcm(1,..,n) where n runs over the prime powers A000961, LCMs are in A051451. %C A058022 Note that a(1) = 3 and a(2) = 4 use -2 as the preceding prime. - _Robert Israel_, Nov 18 2015 %H A058022 Charles R Greathouse IV, <a href="/A058022/b058022.txt">Table of n, a(n) for n = 1..1000</a> %e A058022 6th and 7th different values of LCM-s are 840 and 2520. Deviation of immediate preceding primes(839,2503) are:1 and 17. For n=1 LCM[1]=1 and prime=-2 is the largest with deviation 3. So the sequence starts with 3. %p A058022 f:= proc(n) local m; %p A058022 m:= ilcm($1..n); %p A058022 if m < 3 then m + 2 %p A058022 else m - prevprime(m) %p A058022 fi %p A058022 end proc: %p A058022 A000961:= select(t -> nops(numtheory:-factorset(t))<=1, [$1..1000]): %p A058022 map(f, A000961); # _Robert Israel_, Nov 18 2015 %o A058022 (PARI) N=2; print1("3, 4"); for(n=3,1e3, if(isprimepower(n,&p), N*=p; print1(", "N-precprime(N-1)))) \\ _Charles R Greathouse IV_, Nov 18 2015 %Y A058022 Cf. A000961, A003418, A051451. %K A058022 nonn %O A058022 1,1 %A A058022 _Labos Elemer_, Nov 15 2000