cp's OEIS Frontend

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.

A308819 Product of prime powers <= n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Jun 26 2019

Keywords

Comments

a(n) is the smallest number that's divisible by all numbers less than or equal to n. - Keith F. Lynch, Apr 24 2025

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n) = prod(k=1, n, if (isprime(k) || isprimepower(k), k, 1)); \\ Michel Marcus, Jun 27 2019