login
A308819
Product of prime powers <= n.
0
1, 1, 2, 6, 24, 120, 120, 840, 6720, 60480, 60480, 665280, 665280, 8648640, 8648640, 8648640, 138378240, 2352430080, 2352430080, 44696171520, 44696171520, 44696171520, 44696171520, 1028011944960, 1028011944960, 25700298624000, 25700298624000, 693908062848000
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
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jun 26 2019
STATUS
approved