OFFSET
1,2
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
Richard Stong, Twice a Prime Power is Enough (solution to Problem 11761), Amer. Math. Monthly, 123 (2016), pp. 402-403.
Bob Tomper, Problem 11761, Amer. Math. Monthly, 121 (2014), p. 266.
FORMULA
For n > 1, a(n) = 2*A031218(n-1) [Stong].
MATHEMATICA
Table[m = n; While[LCM @@ Range[m] != LCM @@ Range[n, m], m++]; m, {n, 100}]
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 *)
PROG
(PARI) a(n)=if(n>2, while(!isprimepower(n--), ); 2*n, n) \\ Charles R Greathouse IV, Jul 10 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 13 2014
STATUS
approved