Smallest integer divisible by all up to $n$

Given $n$, and given a prime number $p$, there's a non-negative integer $r=r(p)$ such that $p^r\le n\lt p^{r+1}$. The number you are looking for is the product of all the numbers $p^r$ over all the primes $p$.

It is known to be asymptotic to $e^n$, but this is not so easy to prove.


For more, see http://oeis.org/A003418 and references given there.


I guess I'll make my comments an answer...

It's the least common multiple of $\{1,\dots,n\}$, that is, $\mathrm{lcm}(1,2,\dots,n)$

Let $p_1,\dots,p_\ell$ be the primes less than or equal to $n$ and $k_i$ be the largest integer such that $p_i^{k_i}<n$, then $\mathrm{lcm}(1,2,\dots,n)=p_1^{k_1}\cdots p_\ell^{k_\ell}$.