5
$\begingroup$

Possible Duplicate:
How come the number $N!$ can terminate in exactly $1,2,3,4,$ or $6$ zeroes but never $5$ zeroes?

How many zeroes does $2012!$ end with?

My idea is:

402 zeroes come from $2\times 5$, 80 from $2\times 25$, 16 from $2\times 125$ and 3 from $2\times 625$

How can we "show" that this is true?

  • 0
    You know that you can accept one of the answers by clicking on the tick mark (right?) Doesn't have to be necessarily mine2012-03-14

3 Answers 3

14

The correct answer is 501.

In order to find the number of zeros is same as finding the number of factors of powers of $5$. There are more factors of powers of $2$ than the factors of powers of $5$.

For instance $10! = 3628800 = \hspace{3pt}2^8 \hspace{3pt} 3^4 \hspace{3pt}5^2\hspace{3pt} 7$

$\left \lfloor \frac{n}{p} \right \rfloor +\left \lfloor \frac{n}{p^2} \right \rfloor +\left \lfloor \frac{n}{p^3}\right \rfloor + \cdots \left \lfloor \frac{n}{p^{k-1}} \right \rfloor$

where $\left \lfloor \frac{n}{p^k} \right \rfloor=0$. In this case $k=5$ because $\left \lfloor \frac{2012}{5^5} \right \rfloor=0$

$\left \lfloor \frac{2012}{5} \right \rfloor =402, \hspace{6pt} \left \lfloor \frac{2012}{5^2} \right \rfloor = \left \lfloor \frac{402}{5} \right \rfloor =80$

$\left \lfloor \frac{2012}{5^3} \right \rfloor = \left \lfloor \frac{80}{5} \right \rfloor =16, \hspace{6pt} \left \lfloor \frac{2012}{5^4} \right \rfloor = \left \lfloor \frac{16}{5} \right \rfloor =3$

$\left \lfloor \frac{2012}{5} \right \rfloor+ \left \lfloor \frac{2012}{5^2}\right \rfloor +\left \lfloor \frac{2012}{5^3}\right \rfloor +\left \lfloor \frac{2012}{5^4} \right \rfloor = 402+80+16+3=501$

  • 2
    Also, I'd recommend `\left \lfloor \frac{...}{...} \right \rfloor` for writing the floor of a fraction in LaTeX.2012-03-13
5

The power of any prime $p$ in $n!$ is given by

$[\frac{n}{p} ] + [\frac{n}{p^2}] + [\frac{n}{p^3}].......$

The number of zeros in $2012!$is the number of times 5 occurs in its prime factorization

$[\frac{2012}{5} ] + [\frac{2012}{25}] + [\frac{2012}{125}] + [\frac{2012}{625}] + [\frac{2012}{3125}] $= $402 + 16+ 80 + 3 = 501$

hence $2012! $ has $501$ zeros.

  • 0
    Your most welcome tripleV!2012-03-14
3

As you have noticed, zeros come only from the product of an even integer with a multiple of 5. Since there are less multiples of 5 than multiples of 2, you only have to consider multiples of 5. Now multiples of powers of 5 contribute more than one zero. So the number of zeros in $n!$ is $ \def\F#1{\left\lfloor \frac{n}{#1}\right\rfloor} \F{5}+ \F{5^2} + \F{5^3} + \cdots $

  • 0
    @AméricoTavares, fixed, thanks!2012-03-13