What is the smallest natural number $n$ such that the base 10 representation of $n!$ ends with ten zeros
We are looking for the smallest integer $n \geq 0$ such that $10^{10}$ divides $n!$, which means that $v_{2}(n!) \geq 10$ and $v_{5}(n!) \geq 10$. According to Legendre's formula, we know that $v_{2}(n!)=\sum_{i=1}^{\infty}\left\lfloor\frac{n}{2^{i}}\right\rfloor$ and that $v_{5}(n!)=\sum_{i=1}^{\infty}\left\lfloor\frac{n}{5^{i}}\right\rfloor$. In particular, note that $v_{2}(n!) \geq v_{5}(n!)$, so it suffices to find the smallest integer $n \geq 0$ such that $v_{5}(n!) \geq 10$. Observe that if $k$ is an integer and if $0 \leq l \leq 4$, then $v_{5}((5 k)!) = v_{5}((5 k + l)!)$: we can look for $n$ in the form $n = 5 k$. This then makes a "manual" search possible, where we find that $n = 45$. Let's verify this in a few lines:

- $v_{5}(45!) \geq \left\lfloor\frac{45}{5}\right\rfloor + \left\lfloor\frac{45}{25}\right\rfloor = 10$ and

- if $n \leq 44$, then $\left\lfloor\frac{n}{5}\right\rfloor \leq 8$, $\left\lfloor\frac{n}{25}\right\rfloor \leq 1$, and $\left\lfloor\frac{n}{5^{i}}\right\rfloor = 0$ if $i \geq 3$, so $v_{5}(n!) \leq 9$.

The natural number we were looking for is therefore $n = 45$.