Prove that $n!=\prod_{k=1}^n \operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$ for any $n \in \mathbb N$

I try to prove the following formula:

$$n!=\prod_{k=1}^n \operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$$

I noticed that

$\upsilon_{p}(\operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)) = s$ iff $\lfloor n/(p^{s+1}) \rfloor < k \leq \lfloor n/(p^{s}) \rfloor $


First, let's notice that the power of $p$ dividing $n!$ is $$ \sum_{i=1}^\infty \left\lfloor \dfrac n{p^i} \right\rfloor \tag{1} \label{1} $$

Secondly, notice that the power of $p$ dividing $\operatorname{lcm}(1,2,...,\ell)$ is the number $q$ which satisfies $p^q \leqslant \ell < p^{q+1}$. So the power of $p$ dividing $\operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$ is the number $q$ which satisfies the chain of inequalities $p^q \leqslant \lfloor n/k \rfloor < p^{q+1}$. This latter chain of inequalities can be rewritten as $$ \dfrac{n}{p^{q+1}} < k \leqslant \dfrac{n}{p^q} . $$ For any given $q$, the number of all $k \in \left\{1,2,\ldots,n\right\}$ that satisfy this chain of inequalities is $\left\lfloor\dfrac{n}{p^q}\right\rfloor - \left\lfloor\dfrac{n}{p^{q+1}}\right\rfloor$.

So the total power of $p$ dividing $\prod\limits_{k=1}^{n} \operatorname{lcm}(1,2,\ldots,\left\lfloor n/k \right\rfloor)$ is $$ \sum_{q} q\left (\left\lfloor\dfrac{n}{p^q}\right\rfloor - \left\lfloor\dfrac{n}{p^{q+1}}\right\rfloor \right)= \sum_{q} \left\lfloor\dfrac{n}{p^q}\right\rfloor $$ Thus we could find it the same as $\eqref{1}$. And it finished our proof.