5
$\begingroup$

To find the tailing zeros of $100!+200!$, I first found $100!$ To be $24$ zeros and $200!$ To be $49$. When we add, the result should be $73$ but the answer is given as $24$ which I cannot understand. Help me out, thanks.

$\endgroup$
2
  • 7
    $\begingroup$ Do not confuse $(100!)\times (200!)$ with $(100!)+(200!)$. As an example, consider $100+100000000=100000100$ which only ends with $2$ zeroes. $\endgroup$
    – JMoravitz
    Commented Jul 11, 2018 at 4:01
  • 1
    $\begingroup$ Just use $100!+200!=100!(1+\frac{200!}{100!})=100!(1+200\cdot 199 \cdots 101)$, and the expression in brackets is clearly not divisible by $10$, so ... $\endgroup$
    – Sil
    Commented Jul 13, 2018 at 2:51

1 Answer 1

3
$\begingroup$

The number of trailing zeros in the decimal representation of $n!$, the factorial of a non-negative integer $n$, can be determined by the formula $$\frac n5+\frac{n}{5^2}+\frac{n}{5^3}+....+\frac{n}{5^k},\mbox{ where $k$ must be chosen such that }5^{k+1}>n$$

Note that the number of tailing zeros in $100!+200!$ is equal to the number of tailing zero's in the smallest factorial. That is because the number of tailing zeros is different in both summands, making sure that the first non-zero digit in $100!$ meets with a zero digit from $200!$ to create the first non-zero digit in the sum. Here the smallest factorial is $100!$ which you already found the tailing zero's to be $24$.

So, the number of tailing zero's in $100!+200!$ is $24$

$\endgroup$
14
  • $\begingroup$ I know about the formula and it is not working. If we use that formula then the total zeros should be 73 but it is given as 24. $\endgroup$
    – Anuraag
    Commented Jul 11, 2018 at 4:07
  • 1
    $\begingroup$ There are no tailing zeros under 4! $\endgroup$
    – Anuraag
    Commented Jul 11, 2018 at 4:10
  • 2
    $\begingroup$ @anurag Right, and neither in $3!$, so by that argument there should be no trailing zeros in the sum, but it so happens that there is one. That was precisely my point. $\endgroup$
    – dxiv
    Commented Jul 11, 2018 at 4:10
  • 1
    $\begingroup$ @dxiv easily fixed. Let $A$ and $B$ be integers which have $a$ and $b$ tailing zeroes respectively. In the event that $a=b$ then $A+B$ has at least as many tailing zeroes as $a$ but it could be more (consider $A=1,B=10^n-1$). However, if $a<b$ then $A+B$ has exactly $a$ tailing zeroes. $\endgroup$
    – JMoravitz
    Commented Jul 11, 2018 at 4:15
  • 2
    $\begingroup$ @JMoravitz Indeed, but it's still not fixed in the posted - and edited, and accepted since - answer ;-) $\endgroup$
    – dxiv
    Commented Jul 11, 2018 at 4:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .