Jim Phillips ([log in to unmask]) wrote:
: Can anyone explain why the works? I know that any number multiplied by 9
: gives a number whose digits add up to 9, but why? Is this an inevitable
: outcome of our base 10 number system? Would a base 8 number system would
: the same for the number 7?
Assume a 2 digit number:
(x * 10 + y) * 9 = w * 10 + z
(x * (9 + 1) + y) * 9 = w * (9 + 1) + z
x * 9 * 9 + x * 9 + y * 9 = w * 9 + w + z
Taking modulus by 9:
0 == w + z, so w + z is a product of 9.
(This is how "casting out 9s" works.)
Your conjecture about 8 and 7 is true too.