Hi everyone! My name is Shank and I signed up for the guest membership so I could ask a question to the Teeming Millions as I’m quite sure that Cecil is very busy. I did a quick search and didn’t find an answer to my question so I’m posing it here.
I was thinking about the number nine the other day and I realized that adding the digits in every multiple of nine results in either the number nine or one of it’s multiples. That is:
5x9=45 and 4+5=9
9x11=99 and 9+9=18 (a multiple of nine)
9x378,652=3,407,868 abd 3+4+0+7+8+6+8=36 (a multiple of nine)
This is true for every multiple of nine (and doesn’t seem to occur with any other single digit). So my question is: Is this a well known fact amongst mathematicians? I’d like to think it was an original thought on my part but I sincerely doubt it. Please Teeming Millions, let me know The Truth.
It is a very well known fact. Here’s another. If you’re doing some accounting, say balancing your checkbook for example, and you’re out of balance by a number divisible by nine, chances are there is a transposition error somewhere in your work. Example:
Let the integer q = sum( a[sub]i[/sub]10[sup]i[/sup], 0 < i < n ), where each a[sub]i[/sub] is in {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Suppose q = 9k for some integer k (which is what being divisible by 9 means). Then 9k = sum( a[sub]i[/sub]10[sup]i[/sup], 0 < i < n ), and 9k = sum( a[sub]i[/sub](10[sup]i[/sup] - 1), 0 < i < n ) + sum( a[sub]i[/sub], 0 < i < n ).
Rearrange that to 9k - sum( a[sub]i[/sub](10[sup]i[/sup] - 1), 0 < i < n ) = sum( a[sub]i[/sub], 0 < i < n ). It should be obvious that everything on the left-hand side of that equation is divisible by 9, which means that everything on the right-hand side must be as well. The right-hand side is the sum of the digits of q, so we’re good.
I’m not a mathematician, but I certainly knew it. There was a song on Square One TV about it – ‘nine, nine, nine, it all comes back to nine, with any number you can find, it all comes back to nine’. It’s also the sort of interesting math fact you might find in book about math (maybe even a textbook) or a book of trivia.
I don’t have a detailed explanation for why it works, but it’s a property of the multiples of n-1 for every base n system. For example, in hexidecimal, the digits of any multiple of F can be added up to give F. For example:
F × C56 = B90A
B + 9 + 0 + A = 1E
1 + E = F
In octal:
7 × 2374 = 21344
2 + 1 + 3 + 4 + 4 = 16
1 + 6 = 7
You can try that out further with the Windows calculator or any scientific calculator.
Nope, works for all multiples of three. The sum of the digits of 6 is 6, and that’s divisible by three.
In base n, the trick works for any divisor of n - 1 (including n - 1 and 1, although that latter case isn’t particularly interesting) and no other numbers.
It’s the same as what’s behind casting out nines. Unfortunately, I don’t completely understand it off the top of my head and I don’t have time to derive it right now. Perhaps Orbifold or Mathochist will stop by and explain.
There’s a technique known as “casting out nines” that’s useful for checking your arithmetic when you’re adding, multiplying, etc. big numbers together (although this technique was more useful, and more widely used, back before calculators were readily available).
Take the digits of each number involved, and add them together. If the result has more than one digit, add its digits, until you’re down to a single digit. If, at any point in the process, any of the digits are 9, or add up to 9, you can disregard them (“cast them out”), as they will not affect the final, one-digit total. What you’ve actually done is to reduce each number to its remainder when divided by 9 (or “modulo 9” as mathematicians would say). Then check your computation on these single-digit remainders: if it’s not true for them, you made a mistake somewhere. (If it is true for them, your original computation is probably correct, but this method won’t catch all errors. In particular, as mentioned by Liberal, it won’t catch transposition errors because these don’t change the sum of a number’s digits.)
Another corollary to this: Take any multi-digit number. Reverse the digits. Subtract the smaller of these two numbers from the larger. The difference will always be divisible by 9.
I’m glad you mentioned that. To this day I can’t think of the number nine without singing that song. It’s right up there with the Sessame Street: one two three FOUR five, six seven eight NINE ten, ELEVEN TWELVE!
In less complicated language than Ultrafilter used, here’s an easy way to look at it.
9 = 10 - 1, right?
So anytime you add 9 to a number, it’s the exact same thing as adding 10, and then subtracting 1 from that number.
So the sum of the digits goes up by one in the 10’s column, and down by one in the 1’s column. Therefore, the sum of the digits remains constant.
(If you were in base 3, adding 2 is equivalent to 3 - 1, which is equivalent to incrementing the 3’s column by one, and decrementing the 1s column by one)
Lib, for your transpose question. Picture a transposed number as
10x + y
and
x + 10y
The difference between these two is
9x - 9y
which is certainly divisible by nine. Try transposing tens and hundreds
100x + 10y - (10x + 100y) = 90x - 90y.
A sliver of Beatles folklore claims that stage crew in the UK use the phrase, “Number nine, number nine” to test a microphone before a show. I don’t know if it’s true. Over here, they say, “Test, one, two, three” or “Check, check.”
Transposing two places in a base-b expansion changes the ith place from d[sub]i[/sub] to d[sub]j[/sub] and vice versa. Let i<j. This adds
(d[sub]i[/sub]-d[sub]j[/sub])b[sup]j[/sup] + (d[sub]j[/sub]-d[sub]i[/sub])b[sup]i[/sup]
to the number. Rearranging terms, this is
(d[sub]i[/sub]-d[sub]j[/sub])(b[sup]j[/sup]-b[sup]i[/sup])
which is (of course) divisible by
(b[sup]j-i[/sup]-1) = (b-1)(b[sup]j-i-1[/sup]+b[sup]j-i-2[/sup]+…+b+1)
and so is divisible by b-1.
Quite a few of those ‘think of a number’ mind reading tricks make use of this ‘power of nine’ - at some point you’ll be asked to multiply by nine then add the two digits together, from that moment on the ‘mindreader’ knows the number you are working with and is able to magically predict the number you are left with at the end of the calculation.
RE: transposition
From what I gathered on my white board last night, the difference between a number and any ordering of its digits is divisble by nine, or generally, following Mathochist, in base B the difference between any number and any rearrangement of that number is divisble by B-1.
e.g.
4160[sub]10[/sub], 1064[sub]10[/sub]
difference = 3096, which is 344*9
4160[sub]16[/sub], 1064[sub]16[/sub]
difference = 30FC, which is 344*F
4160[sub]8[/sub], 1064[sub]8[/sub]
difference = 3074, which is 344*7
Leading zeros do not alter this:
5000001[sub]10[/sub], 0000015[sub]10[/sub]
difference = 4999986, or 555554*9