|
|
|
|
|
by gopalv
1675 days ago
|
|
> there is also a very elegant solution that fits in a tweet. (If you don't want to try solving it, or have tried and have given up, here is the solution I tried to understand the tweet a couple of times, but I couldn't follow the proof from the tweet itself, so I wrote it up again with the basic axiom from the tweet as a basis + work out each step of the process. https://gist.github.com/t3rmin4t0r/a953450ac64b6868540bbce79... The original proof is elegant, because it has a single item of information (the "what") to use to solve the entire thing, but was missing the "how" for me. |
|
For instance 123 ≡ 1+2+3 ≡ 6 (mod 9).
We show congruences using ≡, and always have (mod N) on the far right to indicate the modulus for the congurence.
More generally, if ABC is a decimal string, then we know that ABC ≡ A + B + C (mod 9).
Moreover ABC + DEF + GHI must be congruent to A+B+C + D+E+F + G+H+I (mod 9).
And if ABC + DEF + GHI is equal to 123J, then A+B+C + D+E+F + G+H+I ≡ 123J ≡ 1+2+3+J (mod 9).
Thus:
A+B+C+D+E+F+G+H+I ≡ 1+2+3+J (mod 9)
Now suppose we add J to both sides:
A+B+C+D+E+F+G+H+I+J ≡ 1+2+3+J+J (mod 9)
OK so now we know that the left hand side A+...+J contains all elements from 0 to 9, because of the problem constraint that the letters represent unique digits. The numbers 0 to 9 add together to 45. Now 45 is congruent to 0 (mod 9).
Therefore:
A+B+C+D+E+F+G+H+I+J ≡ 45 ≡ 0 ≡ 6 + 2J (mod 9)
We no longer care about the A+..+J; it's vanished. We solve the remaining equation:
0 ≡ 6 + 2J (mod 9)
If 6 + X (mod 9) is congruent to 0, X must be one of {... -6, 3, 12, 21, 30, 39 ...}: the set of integers congruent to 3, (mod 9).
If X = 2J, where J is a one-digit decimal integer, X must be an even, non-negative integer. That rules out -6, 3 and 21. It can't be 30, because J can't be 15. X must be 12, which gives J = 6.