How many zeros are at the end?

2.1k Views Asked by At

My answer to the following problem is 1337 (from the first one) +2 (from the second one) + 4646 (from the last one) = 5985. But it is different from what in answer sheet. I wonder whether I get the concept wrong. It is highly appreciated if anyone can give me a help.

How many zeros are at the end of $420^{1337}$ x $900!$ x $20160^{4646}$ ?

3

There are 3 best solutions below

2
On

As you said the $420^{1337}$ contributes 1337 zeros and the $20160^{4646}$ contributes 4646 zeros so lets focus on the $900!$.

In $900!$ we need to consider how many 2's and 5's there will be. Clearly there will be more 2's than 5's so the limiting factor for creating zeros at the end will be 5's.

In $900!$ there will be $\frac{900}{5}=180$ numbers which divide by 5. However $\frac{900}{25}=36$ of those will divide by 5 a second time. Also $\lfloor\frac{900}{125}\rfloor=7$ of those will divide by 5 a third time and $\lfloor\frac{900}{625}\rfloor=1$ of those will divide by 5 a fourth time. So there will be $180+36+7+1=224$ 5's in $900!$. Hence $900!$ will contribute 224 zeros.

So the total number of zeros is: $1337+4646+224=6207$.

4
On

Hint:

Let $P(N!)$ - the number of zeros at the end of $N!$. Then $$P(N!)=\left[\frac N5\right]+\left[\frac N{5^2}\right]+\left[\frac N{5^3}\right]+...+\left[\frac N{5^n}\right]+...$$

0
On

The factors $2$ and $5$ in the powers are as below$$420\to2^2\cdot5,\\20160\to2^6\cdot5,$$

so $2\cdot1337+6\cdot4646$ times $2$ and $1337+4646$ times $5$.

The factorial gives

$$\frac{900}2+\frac{450}2+\frac{225}2+\frac{112}2+\frac{56}2+\frac{28}2+\frac{14}2+\frac{7}2+\frac{3}2=895$$ times $2$ and $$\frac{900}5+\frac{180}5+\frac{36}5+\frac75=224$$ times $5$.

In total, $$2^{31445}\cdot5^{6207}$$ which yields $6207$ zeroes.

Actually it wasn't necessary to count the multiplicty of $2$ as it clearly dominates.