%I #28 Oct 30 2023 07:25:58
%S 1,2,4,6,8,10,10,14,16,18,18,22,22,26,26,26,32,34,34,38,38,38,38,46,
%T 46,50,50,54,54,58,58,62,64,64,64,64,64,74,74,74,74,82,82,86,86,86,86,
%U 94,94,98,98,98,98,106,106,106,106,106,106,118,118,122,122,122
%N Least number m such that lcm(1,2,3,...,m) = lcm(n,n+1,n+2,...,m).
%H Charles R Greathouse IV, <a href="/A238898/b238898.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H Richard Stong, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.123.4.399">Twice a Prime Power is Enough</a> (solution to Problem 11761), Amer. Math. Monthly, 123 (2016), pp. 402-403.
%H Bob Tomper, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.121.03.266">Problem 11761</a>, Amer. Math. Monthly, 121 (2014), p. 266.
%F For n > 1, a(n) = 2*A031218(n-1) [Stong].
%t Table[m = n; While[LCM @@ Range[m] != LCM @@ Range[n, m], m++]; m, {n, 100}]
%t f[n_] := If[n < 3, n, m = n - 1; While[ !PrimePowerQ@ m, m--]; 2m]; Array[f, 64] (* _Robert G. Wilson v_, Mar 06 2018 after Charles R. Greathouse IV *)
%o (PARI) a(n)=if(n>2,while(!isprimepower(n--),); 2*n,n) \\ _Charles R Greathouse IV_, Jul 10 2015
%Y Cf. A003418 (LCM), A031218.
%K nonn
%O 1,2
%A _T. D. Noe_, Mar 13 2014