Least common multiple of a list of numbers
Suppose that we are interested in the LCM of all numbers from $1$ to $n$. It is not hard to check that the answer is the product of $p^{k_p}$ for all primes $p \leq n$, where $k_p$ is the largest integer such that $p^{k_p} \leq n$. For example, the primes at most 10 are $2,3,5,7$, and so the answer is
$$
2^3 \cdot 3^2 \cdot 5 \cdot 7 = 2520.
$$
Similarly, the primes at most 20 are $2,3,5,7,11,13,17,19$, and so the answer is
$$
2^4 \cdot 3^2 \cdot 5 \cdot 7 \cdot 11 \cdot 13 \cdot 17 \cdot 19.
$$