OFFSET
0,3
EXAMPLE
a(9) = 60480 because 2, 3, 4, 5, 7, 8, 9 are the prime powers less than or equal to 9 and 2 * 3 * 4 * 5 * 7 * 8 * 9 = 60480.
MATHEMATICA
a[n_] := Product[If[PrimePowerQ[k], k, 1], {k, 1, n}]; Table[a[n], {n, 0, 27}]
Module[{nn=50, ppwr}, ppwr=Select[Range[nn], PrimePowerQ[#]&]; Table[Times@@ Select[ ppwr, #<= n&], {n, 0, nn}]] (* Harvey P. Dale, Apr 03 2024 *)
PROG
(PARI) a(n) = prod(k=1, n, if (isprime(k) || isprimepower(k), k, 1)); \\ Michel Marcus, Jun 27 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jun 26 2019
STATUS
approved