## January 22, 2014

### Horse 1598 - Three Is a Magic Number

Firstly, something really weird to get your brain ticking over:

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 = 91
and
1² + 2² + 3² + 4² + 5² + 6² = 91

woo boggity boogity boo... spooky...

Okay, enough of that. Onto the main subject: 3. It's a magic number. Oh yes it is.

There a number of check calculations that I do in accounting such as, if an amount is wrong by some multiple of 9 then there's a transposition of digits, then there's the method of casting out nines to see if a very big calculation is correct but some of the short tests I use are divisibility tests. To wit:
- A number that is divisible by 5 will end in either 5 or 0.
- A number that is divisible by 4 will end in another two-digit number divisible by 4. The number 8,539,756 is divisible by 4 because 56 is.

But the two divisibility tests which are the freakiest are that:
- A number that is divisible by 9 if you sum the digits, is also divisible by 9.
151,732,989 is divisible by 9, 1+5+1+7+3+2+9+8+9 = 45 and 4+5=9 (151,732,989/9 = 16,859,221)
- A number that is divisible by 3 if you sum the digits, is also divisible by 3.
68,906,247 is divisible by 3, 6+8+9+0+6+2+4+7 = 42 and 4+2 = 6 (68,906,247/3 = 22,968,749)

It must said though that 9 is only freaky because 9 is 3 in a 3ish way. 3*3=9. However (and this is the part which blew my mind to pieces whilst I was playing with this in my mind on the train), the divisibilty test for 3 also works for any base 3n+1 where n is any number you like.

Pick any number in base 10. Let's pick 120 (1+2+0 = 3). What does that number look like in other bases 3n+1?

n=1, 3n+1=4 Base 4 = 1320 (1+3+2+0 = 6)
n=2, 3n+1=7 Base 7 = 231 (2+3+1 = 6)
n=3, 3n+1=10 Base 10 = 120 (1+2+0 = 3)
n=4, 3n+1=13 Base 13 = 93 (9+3=12 1+2 = 3)
n=5, 3n+1=16 Base 16 = 78 (7+8=15 1+5 = 6)
n=11, 3n+1=34 Base 34 = 3I (3+I = L*)

Actually this all has to do with modular arithmetic and number theory itself. There are practical applications for this sort of thing, particularly in cryptography but for someone who works in an office, looking at boring base 10 maths in a plusish and timesish sort of way, it's a fun diversion.

*For bases bigger than 10, you're going to need some new symbols for the numbers; the usual suggestion is to start using the letters. L is whatever the twenty-first one is, except that even describing it as the twenty-first, still implies base 10. I briefly touched on this idea in Horse 1109.
** On that note, I don't know what factorial "MATHS AHEAD" would be. I imagine though that the base used would be pretty big though.