ocalhoun

Okay, recently I've grown curious thinking about this... and before I spend hours pondering it... maybe someone can explain it.

So: First of all, it's an interesting fact that any number is (evenly) divisible by 3 if (and only if) all the digits of that number add up to a number divisible by 3.

So,

102: 1 + 0 + 2 = 3 : 102 is divisible by 3.

672: 6 + 7 + 2 = 15 : 672 is divisible by 3.

712: 7 + 1 + 2 = 10 :712 is not divisible by 3.

42: 4 + 2 = 6 : 42 is divisible by 3.

74945670: 7 + 4 + 9 + 4 + 5 + 6 + 7 + 0 = 42 : 74945670 is divisible by 3.

This also works for 9 (3^2), and for 27 (3^3)... and so on.

(ie, 8010: 8 + 0 + 1 + 0 = 9: 8010 is divisible by 9...

90828: 9 + 0 + 8 + 2 + 8 = 27: 90828 is divisible by 27.)

But it does NOT work for any number that is not a (positive integer) power of 3.

Neat math trick and all... but it has me wondering:

WHY?

Why does this work, and how?

Is it a quirk of our base-10 number system? Would base 8 or base 16 or something have a different number that behaved like this?

...After some thinking about it, base 8 doesn't seem to have such a number, and this trick with the threes doesn't seem to work in base 8.

...But still, how does this work?

Not understanding it is about to drive me crazy.

So: First of all, it's an interesting fact that any number is (evenly) divisible by 3 if (and only if) all the digits of that number add up to a number divisible by 3.

So,

102: 1 + 0 + 2 = 3 : 102 is divisible by 3.

672: 6 + 7 + 2 = 15 : 672 is divisible by 3.

712: 7 + 1 + 2 = 10 :712 is not divisible by 3.

42: 4 + 2 = 6 : 42 is divisible by 3.

74945670: 7 + 4 + 9 + 4 + 5 + 6 + 7 + 0 = 42 : 74945670 is divisible by 3.

This also works for 9 (3^2), and for 27 (3^3)... and so on.

(ie, 8010: 8 + 0 + 1 + 0 = 9: 8010 is divisible by 9...

90828: 9 + 0 + 8 + 2 + 8 = 27: 90828 is divisible by 27.)

But it does NOT work for any number that is not a (positive integer) power of 3.

Neat math trick and all... but it has me wondering:

WHY?

Why does this work, and how?

Is it a quirk of our base-10 number system? Would base 8 or base 16 or something have a different number that behaved like this?

...After some thinking about it, base 8 doesn't seem to have such a number, and this trick with the threes doesn't seem to work in base 8.

...But still, how does this work?

Not understanding it is about to drive me crazy.