n=5*(10!)
no of zeros does n end with?
Legendre's Theorem - The Prime Factorization of Factorials
In mathematics,
Legendre's formula gives an expression for the exponent of the largest power of a prime p that divides the factorial
\({\displaystyle n!}\)
1. The exponent of 2x
We calculate 10 in base 2:
\(\begin{array}{rcll} 10_{10} &=& 1010_2 \\ \end{array}\)
The sum of the digits in base 2 is \(\begin{array}{rcll} 1+0+1+0 = 2 \end{array}\)
The exponent is: \(\begin{array}{|rcll|} \hline x &=&\frac{10-(\text{sum of the standard base-}\mathbf{2}\text{ digits of 10})}{\mathbf{2}-1} \\ x &=&\frac{10-2}{2} \\ x &=&4\\ \hline \end{array}\)
2. The exponent of 5x
We calculate 10 in base 5:
\(\begin{array}{rcll} 10_{10} &=& 20_5 \\ \end{array}\)
The sum of the digits in base 5 is \(\begin{array}{rcll} 2+0 = 2 \end{array}\)
The exponent is: \(\begin{array}{|rcll|} \hline x &=&\frac{10-(\text{sum of the standard base-}\mathbf{5}\text{ digits of 10})}{\mathbf{5}-1} \\ x &=&\frac{10-2}{4} \\ x &=&2\\ \hline \end{array}\)
\(\begin{array}{|rcll|} \hline 10! &=& 2^4\cdot 5^2\ldots \\ n=5\cdot 10! &=& 2^4\cdot 5^3\ldots \\ \hline \end{array}\)
Number of zeros does n end with ?:
\(\begin{array}{|rcll|} \hline && 2^4\cdot 5^3 \\ &=& 2^3\cdot5^3\cdot 2 \\ &=& (2\cdot 5)^3 \cdot 2 \\ &=& 2\cdot 10^\mathbf{\color{red}3} \\ \hline \end{array}\)
n ends with 3 zeros.