Number of $0$ in great number

93 Views Asked by At

For example, $11111111111111100$ ends with $2$ zeros ,when we did know the decimal representation like $100!$ also.

I would like a justified answer for the following question . How many $0$ are in the end of decimal representation of $ 100!$? Is there a general process to know this number for greater number like $2^{100!}\times5^{39!}$?

3

There are 3 best solutions below

0
On

It is fairly easy with factorials, a number ends with as many $0$s as the number of $5*2$ in his factorization. It is obvious that there are more 2 than 5 in the factorization of any factorial so we only need to count how many $5$s are there in the factorization of $100!$. These are $\frac{100}{5}+\frac{100}{5^2}=24$ since $5^3>100$

3
On

Of the 100 numbers multiplying to give 100! ten of them end in 0 (10, 20, ...100) giving 11 zeros. The only other way to get a 0 is to mutliply an even number by a number ending in 5. There are ten numbers ending in 5 (5, 15,...,95) and multiplying by any ten even numbers (except the multiples of 10) will give 10 more zeros. So that is 21 zeros on the end of 100!

0
On

A very useful result to know, which also helps here, is Legendre's Theorem :

The number $n!$ contains the prime factor $p$ exactly $$\sum_{k\geq 1} \lfloor n/p^k \rfloor$$