TITLE: Number of zeroes at end of factorial
QUESTION [5 upvotes]: Question:
How many  zeroes will there be at the end of $(127)!$
Approach:
Considering the fact that when two numbers ending in $x$ and $y$ zeroes are multiplied, the resulting number contains $x+y$ zeroes:
The numbers to be multiplied that contain zeroes:
$$120,110,100,90,80.....10$$
That comes out to be a total of 13 zeroes. However, that doesn't seem to be the correct answer. Rethinking it, it's obvious that I'm missing out on several cases.
For example:
$$25*22 = 550$$
This is just one of the cases which will add a zero. How would I account for all these cases?

REPLY [7 votes]: The number of trailing zeros on $n!$ is just the number of factors of 5 lurking
in $\{1, 2, .... n\}$, which is 
$$\sum_{k\ge 1} \left\lfloor{n\over 5^k}\right\rfloor.$$

REPLY [4 votes]: Number of zeroes can be found by finding the exponent of $5$ in $127!$, i.e.
$${E_{5}\lfloor127!\rfloor=\lfloor\dfrac{127}{5}\rfloor+\lfloor\dfrac{127}{25}\rfloor+\lfloor\dfrac{127}{125}\rfloor=25+5+1=31}$$