I would like to derive the first $n$ such that (The number of trailing zeros in $n!$) $\geq z$, given $z$.
According to this answer, we can estimate $n$ by $4z$. He explains the reason as follows.
To get a very good estimate, note that the number of trailing $0$'s is $$\left\lfloor \frac{n}{5}\right\rfloor+ \left\lfloor \frac{n}{5^2}\right\rfloor+ \left\lfloor \frac{n}{5^3}\right\rfloor+\cdots.$$ This is less than the infinite sum $$\frac{n}{5}+\frac{n}{5^2}+\frac{n}{5^3}+\cdots.$$ The infinite geometric series has sum $\frac{n}{4}$. So if we want $z$ trailing zeros, then $n \gt 4z$. A computation using $4z$ will tell us how much we need to go forward from $4z$. The difference between $\frac{n}{5^k}$ and $\left\lfloor \frac{n}{5^k}\right\rfloor$ is always less than $1$. So the amount we may need to go forward to find the appropriate $n$ (if there are any) is logarithmic in $z$.
(Emphasis mine)
I don't understand the highlighted part here.
- What does "The amount ... is logarithmic in $z$ " exactly mean? Does it mean that $\lim_{z\to \infty} (\text{A function of }z)/\log{z} \to 1$? Still, I don't know what is supposed to be in the numerator.
- How does it follow from "The difference ... is always less than 1"?
I thought I would comment on the original answer, but the answerer does not seem to be active anymore.