What is the rightmost nonzero digit of $1000000!$?
Problem
Source:
Tags: algorithm, modular arithmetic, Miscellaneous Problems
06.03.2008 02:41
it is the same exercise http://www.mathlinks.ro/Forum/viewtopic.php?t=151005 bye paolo
06.03.2008 09:24
Actually, this number is substantially larger
06.03.2008 13:54
i know but the "algoritm" is the same we find a,b s.t. $ 5^a || n!$ and $ 2^b || n!$, so bye $ (1*3*7*9)^{2m}\equiv 1 \pmod {10}$, we have that the last nonzero digit is k s.t. $ k \equiv 2^{b - a} \pmod {10}$ and is trivial.
18.07.2016 14:41
Peter wrote: What is the rightmost nonzero digit of $1000000!$? $\sum_{k=1}^{\infty}[\frac{1000000}{5^k}]=249998$. We have to get $x\equiv \frac{1000000!}{2^{249998}\cdot 5^{249998}}$ $(mod 10)$. Apparently $x$ is even, so $x=0,2,4,6,8$. On the other hand, $\frac{1000000!}{5^{249998}}\equiv (1\cdot 2\cdot 3\cdot 4\cdot 6\cdot 7\cdot 8\cdot 9)^{100000}\equiv 6^{100000}\equiv 6$ $(mod 10)$. Then $2^{249998}\cdot x\equiv 6\Leftrightarrow x\equiv 4,9$ $(mod 10)$. Therefore $x$ is 4. The answer is $\boxed 4$.$\blacksquare$