# Determine the largest power of 10 that is a factor of $50!\,$?

How would one find the largest power of 10 which is a factor of $50!\,{}$?

As ncmathsadist says, it is the number of the 5's (i.e. there are more than enough 2's). The fives come from 5, 10, 15, 20, ..., 50. One five comes from each totaling 10, and 25 and 50 give you an extra, so the total would be 12.

• yes because 50 (5*5*2) and 25 (5*5) so 25 has two factor of five while the rest have at least one. Jan 24, 2014 at 23:40
• @FernandoMartinez, Exactly. Thank you for clarifying. Jan 25, 2014 at 5:15

It is the same as the largest power of 5 that is a factor of $50!$

• Is this because $5*2=10$ but $50!$ has large number of multiples of 2? Jan 24, 2014 at 23:33
• yes. Every factor of five has a surfeit of powers of 2 to "mate with" to produce a factor of 10. Jan 24, 2014 at 23:34

In this answer, it is shown that the number of factors of a prime $p$ that divide $n!$ is $$\frac{n-\sigma_p(n)}{p-1}$$ where $\sigma_p(n)$ is the sum of the digits of $n$ written in base-$p$.

The number of factors of $10$ that divide $50!$ is the number of factors of $5$ that divide it (there are over twice as many factors of $2$). $50=200_\text{five}$ so $\sigma_5(50)=2$ and the number of factors of $5$ that divide $50!$ is $$\frac{50-2}{5-1}=12$$

We could also compute the number of factors of $2$ that divide $50!$: $50=110010_\text{two}$ so $\sigma_2(50)=3$ and the number of factors of $2$ that divide $50!$ is $$\frac{50-3}{2-1}=47$$ Thus, there are enough factors of $2$ to match the number of factors of $5$. This ensures that the number of factors of $10$ in $50!$ is $12$.

This problem is equivalent to find the number of trailing zeros in $n!=50!$. I adapt this old answer of mine to the question Derive a formula to find the number of trailing zeroes in $n!$.

For every integer $n$ the exponent of the prime $p$ in the prime factorization of $n!$ is given by de Polignac's formula $$\displaystyle\sum_{i\ge 1}\left\lfloor \frac{n}{p^{i}} \right\rfloor =\left\lfloor \frac{n}{p}\right\rfloor+\left\lfloor \frac{n}{p^2}\right\rfloor+\cdots+\left\lfloor \frac{n}{p^k}\right\rfloor ,\qquad p^k\le n,\ p^{k+1}\gt n.$$

because this exponent is obtained by adding to the numbers between $1$ and $n$ which are divisible by $p$ the number of those divisible by $p^{2}$, then the number of those divisible by $p^{3}$, and so on. The process terminates at the greatest power $p^{i}\leq n$.

For $n=50$ the exponent of $5$ in in the prime factorization of $50!$ is $$e_5(50!)=\sum_{i\geq 1}\left\lfloor \dfrac{50}{5^{i}}\right\rfloor=\left\lfloor \dfrac{50}{5}\right\rfloor +\left\lfloor \dfrac{50}{5^{2}}\right\rfloor =10+2=12<47.$$

Similarly the exponent of $2$ in the prime factorization of $50!$ is

\begin{align} e_2(50!)=\sum_{i\geq 1}\left\lfloor \dfrac{50}{2^{i}}\right\rfloor &= \left\lfloor \dfrac{50}{2}\right\rfloor+\left\lfloor \dfrac{50}{2^{2}} \right\rfloor + \left\lfloor \dfrac{50}{2^{3}} \right\rfloor + \left\lfloor\dfrac{50}{2^{4}}\right\rfloor +\left\lfloor \dfrac{50}{2^{5}}\right\rfloor \\ &=25+12+6+3+1 \\ &=47>12. \end{align}

So $50!=2^{47}5^{12}m=(2^{35}m)10^{12}$, with $\gcd(m,10)=1$, as pointed out by robjohn. Consequently, the number of trailing zeroes in $50!$ is $12$ and the power is $10^{12}$.

• more precisely $(m,10)=1$.
– robjohn
Jan 25, 2014 at 5:02
• @robjohn Thanks! I've corrected the answer. Jan 25, 2014 at 13:02