The number game is part of the longlasting French game "des chiffres et des lettres", which in UK is also known as "Countdown".
Short description: you have 6 tiles corresponding to numbers, and you must use all 4 operations (add, multiply, substract, divide) to obtain a randomly chosen three digit number.
I play this game quite often and stumbled upon a page which gave this trick to tell whether a (three digit) number is divisible by 8. Say the three digits are named H, T and U (for Hundreds, Tens and Units), then to find if HTU is divisible by 8, you can do this:
- if H is even, then TU must be divisible by 8;
- if H is odd, then TU must be divisible by 4, but not 8.
And indeed this works (insofar as I didn't find any counterexample); for instance 544 is divisible by 8 (8 * 68) since 5 is odd, and 44 is divisible by 4 but not 8.
But what is the proof?
Answer
Note that $1000$ is divisible by $8$, so we can just consider $H$, $T$, and $U$.
In fact, let's group $T$ and $U$ together to R, i.e. $R=10T+U$.
So, we now need to consider $100H+R$.
If $R$ is divisible by $8$ and $H$ is odd, then the remainder would be $100H = 100(2n+1) = 200n+100 \to 100 \to 4$.
If $R$ is divisible by $4$ but not by $8$, and $H$ is odd, then we can write $R=4(2p+1)$ and $H=2h+1$, so the remainder would be $200h+100+8p+4=8(25h+p+13) \to 0$.
One can consider the other two cases to prove the algorithm.
No comments:
Post a Comment