Posted: Mar 23, 2012 10:29 pm
by Evolving
Returning (with apologies) to mathematical seriousness: the phenomenon noted in the first part of the OP is the inevitable consequence of using 10 as the basis for our counting system.

Ten has the property that, if you divide it by the number one less than it (nine) or by the square root of that number (three), the remainder is 1. We say that 10 is congruent to 1 modulo 3 (or modulo 9), meaning that dividing either of these numbers by three (or nine) leaves the same remainder.

Ten squared (one hundred) also leaves the remainder 1 if you divide it by three (or nine), and in fact this is one of the properties of congruence: if two numbers a and b are congruent modulo a certain number, then so are the k-th power of a and b (where k is an integer), i.e. [math] is congruent to [math] (modulo that number). For instance, [math] is congruent to [math], and by induction all powers of 10 are therefore congruent to one another (modulo three).

When we represent a whole number in our system on the base 10, we are expressing that number in terms of multiples of powers of 10; for example

Now, another property of congruence is that, if a is congruent to b (modulo a certain number) and c is congruent to d (modulo the same number), then the product ab is congruent to cd (modulo the same number); so we can easily see that
[math] is congruent to [math] is congruent to [math], and [math] is congruent to [math], all modulo three (or nine, if you insist). So 300 is congruent to 3, 80 is congruent to 8, and 2 is congruent to 2 (duh).

And finally, a further property of congruence is that if a is congruent to b (modulo a certain number) and c is congruent to d (modulo the same number), then a+b is congruent to c+d (modulo that number). So 300 + 80 + 2 is congruent to 3 + 8 + 2, and we arrive at the result that any number is congruent (leaves the same remainder on division) to the sum of its digits (modulo three or nine).

And what I wanted to work round to is that you inevitably get the same result, whatever base your counting system has. If, for instance, we used the base 6, we could apply the same rule with respect to division by 5: if the sum of the digits is divisible by 5, so is the number itself. If we used the base 127, it would work with division by 126. And so on.