2

Is there any proof where we can find the last two digits of odd number product.

$$1\cdot3\cdot5\cdot7\cdot\ldots\cdot99 = a_i$$ Find the last two digits of $a_i$. The answer would be $75$ as any multiples of $5$ will always end with $5$.

Are there any solid proof or trick to find the last two digits of the above product?

Jyrki Lahtonen
  • 133,153

4 Answers4

5

One of the terms in $1\cdot3\cdot5\cdot...\cdot99$ will be $25$, so indeed the answer is either $25$ or $75$. Note that $25k$ ends in $25$ if $k\equiv1$ (mod $4$) and $25k$ ends in $75$ if $k\equiv3$ (mod $4$). We have $$1\cdot3\cdot5\cdot...\cdot99\equiv1\cdot3\cdot1\cdot...\cdot1\cdot3=3^{25}=(3^2)^{12}\cdot3\equiv1^{12}\cdot3=3\mbox{ (mod }4)$$ and $25\equiv1$ (mod $4$), so $k\equiv3$ (mod $4$). Conclusion: The last two digits of $1\cdot3\cdot5\cdot...\cdot99$ are $75$.

Indeed, as Bill Dubuque pointed out, our key observation can be written as $25k\mbox{ (mod }25\cdot4)=25\cdot(k\mbox{ (mod }4))$. In this particular case it can be easily seen by just a little bit of experimentation and a proof by induction is also not very difficult, however writing it in this form shows that this is a particular case of a much more general fact. See the mod distributive law for details.

SmileyCraft
  • 6,777
  • 13
  • 26
  • 1
    Implicitly used above is $\ 25k\bmod 25\cdot 4, =, 25(k\bmod 4).\ $ This is worth explicit mention because this identity has widespread application in number theory and algebra. It is an operational form of CRT that frequently simplifies proofs. Follow the link in the comment on my answer to learn more. – Bill Dubuque Dec 22 '18 at 17:28
  • I'll admit, I didn't quite observe the general fact yet when writing this. I've added an explicit mention :) – SmileyCraft Dec 22 '18 at 17:54
3

Hint $\ \ \ 25\mid n\:\Rightarrow\: n\bmod 100 = 25(n/25 \bmod 4) = 25(\color{#c00}{n\bmod 4}) = 25\cdot\color{#c00}3$

since here $\!\color{#c00}{\bmod 4\!:\ n }\equiv (1\cdot 3)(5\cdot 7)\cdots (97\cdot 99)\equiv (1\cdot(-1))^{\large25}\!\equiv -1\equiv\color{#c00} 3$

Bill Dubuque
  • 272,048
2

Hint: The number $5^{10}$ ends with $25$. On the other hand, if $k$ is odd, then the number $25k$ ends with:

  • $25$ if $k=4n+1$ for some non-negative integer $n$;
  • $75$ if $4=4n+3$ for some non-negative integer $n$.
0

$1,4 + 1=5, 2*8+1=9,....,4*24+1=97$ are are $1 \pmod 4$

$3,7,......, 4*24+3=99$ are all $-1\pmod 4$.

So $N = 1\cdot 3.... \cdot 97\cdot 99 \equiv 1^{25}(-1)^{25}\equiv -1\equiv 3\pmod 4$.

And obviously $N \equiv 0 \pmod {25}$.

So by Chinese Remainder theorem we can always solve $N\pmod{100 = 4*25}\equiv 75$.

...

Most statements of CRT give the formula for solving but I can never remember the proper variables so I always do it by hand each time.

In this case $3 + 4k = 25j;0\le k < 24; 0\le j < 4;$. So $ 3 + 4k= j + 4(6j)$. $j = 3; k=6j=18$

and $N \equiv 3+4k = 25j = 75 \pmod {100}$

fleablood
  • 124,253
  • This is exactly the same as the method I posted 15 mins prior, except you use CRT but I instead use MDL = Mod Distributive Law, an operational form of CRT which is easier to apply in many cases (see the last paragraph here for further details) – Bill Dubuque Dec 22 '18 at 17:01
  • Yes. But I used the CRT instead of MDL. (and you hadn't posted when I had begun typing). – fleablood Dec 22 '18 at 17:05
  • You should learn MDL - it makes problems like this much easier (I did this in 10 secs mentally) – Bill Dubuque Dec 22 '18 at 17:07
  • And for that matter your and my answers are both exactly the same as SmileyCraft who answered before either of us. – fleablood Dec 22 '18 at 17:07
  • "it makes problems like this much easier." For certain values of "easy".... – fleablood Dec 22 '18 at 17:09
  • I don't agree - too much handwaving in the answer you mention. Using CRT or MDL makes the argument rigorous and also generalizes, but handwaving accomplishes neither. – Bill Dubuque Dec 22 '18 at 17:13
  • Heh... you said it. I didn't. Point being I think because our explanations are different. I chose CRT because it's well known and clear. I think we have 3 different answers although they all pretty much do the same thing for the same reasons. But I think the explanations and hence the "answers" are different. But I recuse myself from judging their worth. – fleablood Dec 22 '18 at 17:21
  • My point has nothing to do with "answer worth". Rather, I aim to help readers understand better ways to solve such problems,. For these types of problems CRT is typically much more cumbersome than MDL. For many worked examples using MDL see these 31 Linked questions esp. the polynomial examples. MDL is so easy one can often do the entire calculation as a purely mental straight-line computation. Unfortunately it is rarely explicitly taught in elementary courses – Bill Dubuque Dec 22 '18 at 17:44
  • More cumbersome? Think so? Perhaps. I figure it was obvious $25|N$ so last digits are $00,25,50,75$ but as its odd $25,75$ but what. So I had to figure out the "rest" of $N$ is and... well, CRT seemed easier to group as I didn't need to omit the $25$. – fleablood Dec 22 '18 at 17:52
  • The point of using general theorems like MDL (or CRT) is that one doesn't have to reinvent the wheel every time one encounters a special case. Here the idea is quite simple, viz. pulling a common factor out of a $!\bmod!$ expression - just as one does from a sum. Imagine how cumbersome arithmetic would be if one hadn't proved and memorized $,ab+ac = a(b+c),$ but instead had to rediscover / reprove it every time it was used. The $!\bmod!$ distributive law analog is just as fundamental in number theory. – Bill Dubuque Dec 22 '18 at 18:00