On the trick with 9s

Pick a number, any number1 Let's say 24,876,028, one of my favourites in the 20-millions. I can tell by looking at it that it's one more than a multiple of 9.

It's not that clever a trick: I just added up the digits (getting 37), and repeated the trick with that number (10), and one more time (1). In fact, I didn't even do that: whenever I got above 9, I subtracted it. This works with any number you like: add up the digits, and repeat the process until you get a single digit, and that result will be the remainder when you divide the number by 9.

Why is that? Well, *that's* where the neat maths comes in. I can take away any multiple of nine from my number without changing its remainder. In particular, 20,000,000 is $2 \times 9,999,999 + 2$, and 4,000,000 is $4 \times 999,999 + 4$, and so on.

That means: $24,876,028 = (2 \times 9,999,999 + 2) + (4 \times 999,999 + 4) + (8 \times 99,999+8) + (7 \times 9,999 + 7) + (6\times 999 + 6) + (2\times 9 + 2) + 8$. The first term in each bracket is a multiple of 9, which can be discarded if we're interested in the remainder. The second in each is simply the digit itself - so $24,876,028 \equiv (2 + 4 + 8 + 7 + 6 + 0 + 2 + 8) \pmod{9}$.

A consequence of this is that any number whose digits sum to a multiple of 9 is itself a multiple of 9, and a similar result for multiples of 3 follows much the same way.


Colin is a Weymouth maths tutor, author of several Maths For Dummies books and A-level maths guides. He started Flying Colours Maths in 2008. He lives with an espresso pot and nothing to prove.

  1. OK, any positive integer. Nobody likes a smartarse. []


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sign up for the Sum Comfort newsletter and get a free e-book of mathematical quotations.

No spam ever, obviously.

Where do you teach?

I teach in my home in Abbotsbury Road, Weymouth.

It's a 15-minute walk from Weymouth station, and it's on bus routes 3, 8 and X53. On-road parking is available nearby.

On twitter