Tests for three and nine
Can you tell whether a big number splits evenly into threes or nines without doing the division?
Where you are 10 in Divisibility and primes
When you reach for it
Felipe threads his bracelets in a repeating pattern of 3 beads, and every one of Amara’s bracelets takes 9 beads. Each of them has a jar of beads and the same question: will the beads come out even, with none left over? That is the question “is this number divisible by 3?” or “is it divisible by 9?”. A number is divisible by 9 when it is 9 times a whole number, so it splits into groups of 9 with nothing left; divisible by 3 means the same with groups of 3.
For 2, 5 and 10 the last digit settles it, as in the tests for 2, 5 and 10. For 3 and 9 the last digit is no help. 13 and 33 both end in 3, but only 33 is a multiple of 3. 19 and 99 both end in 9, but only 99 is a multiple of 9. Every digit matters, so the test for these two uses all of them at once.
Reach for it when a number is too big to divide comfortably in your head and you only need to know whether 3 or 9 goes in exactly, or how many are left over. Long division would answer the same question, with many more steps.
The procedure
Add the digits of the number. The result is the number’s digit sum. Then:
A whole number is divisible by 9 exactly when its digit sum is divisible by 9. A whole number is divisible by 3 exactly when its digit sum is divisible by 3.
The digit sum of 5382 is 5 + 3 + 8 + 2 = 18, and 18 is divisible by 9, so 5382 is divisible by 9 (in fact 5382 = 9 \times 598). If the digit sum is still too big to judge, add its digits again. That is allowed because the digit sum is a whole number like any other, and the test applies to it as well.
Why it works: one more than a multiple of nine
The reason is place value. Every place value is one more than a multiple of 9:
| Place value | Nines and one more |
|---|---|
| 10 | 9 + 1 |
| 100 | 99 + 1 |
| 1000 | 999 + 1 |
| 10{,}000 | 9999 + 1 |
Each of 9, 99, 999, 9999 is a multiple of 9: 9 = 9 \times 1, 99 = 9 \times 11, 999 = 9 \times 111, 9999 = 9 \times 1111. So a bag of ten beads makes one full bracelet of 9 with one bead over, and a bag of a hundred makes eleven full bracelets with one bead over.
Now take 34 beads: three tens and four ones. Each ten gives a full group of 9 and one bead over, so the three tens leave 3 beads over, and the four ones are all left over too.
The leftovers are 3 + 4 = 7, which is exactly the digit sum. So 34 is three full groups of 9 (that is, 27) and 7 more, and 34 \div 9 is 3 remainder 7.
The same thing happens in every place. Split 5382 by its digits, as in expanded form, and sort each part into full groups of 9 and what is left over:
| Part of 5382 | Full groups of 9 | Left over |
|---|---|---|
| 5 \times 1000 | 5 \times 999 | 5 |
| 3 \times 100 | 3 \times 99 | 3 |
| 8 \times 10 | 8 \times 9 | 8 |
| 2 | none | 2 |
Every number in the middle column is a multiple of 9, so all of them together are a multiple of 9, and they leave nothing over. Every bead that does not fit into those groups is in the last column, and the last column adds up to the digit sum, 18. So 5382 is a multiple of 9 plus 18 more. Whether the whole pile comes out even depends only on those 18 beads: they make two more groups of 9 exactly, so nothing is left. Had the last column added to 17, it would make one group with 8 over, and the whole number would leave 8 over.
That gives a stronger fact than the test, and the test is the case where the leftover is 0:
A whole number leaves the same remainder as its digit sum when divided by 9.
For 3, notice that a group of 9 beads is three groups of 3, because 9 = 3 \times 3. So the full groups of 9 in the middle column also split into groups of 3 with nothing over, and again everything left over is in the last column:
A whole number leaves the same remainder as its digit sum when divided by 3.
Since every group of 9 is three groups of 3, a number divisible by 9 is always divisible by 3. The reverse fails: 12 is divisible by 3 but not by 9.
Worked examples
Bracelets of nine
Amara has 342 beads. Can she make bracelets of 9 beads each with none left over? How many bracelets?
SolutionThe digit sum is 3 + 4 + 2 = 9, which is divisible by 9. So 342 is divisible by 9, and every bead gets used. Dividing gives the number of bracelets: 342 \div 9 = 38. Check: 9 \times 38 = 342.
A pattern of three that does not come out even
Felipe has 1075 beads and threads them in groups of 3. Will any be left over?
SolutionThe digit sum is 1 + 0 + 7 + 5 = 13. Since 13 = 3 \times 4 + 1, the digit sum is not divisible by 3, so neither is 1075. The remainder rule says more: 1075 leaves the same remainder as 13, which is 1. Exactly 1 bead is left over. Check: 3 \times 358 = 1074, and 1075 - 1074 = 1.
Divisible by three but not by nine
Hana has 2316 beads. Can she use all of them in groups of 3? In groups of 9?
SolutionThe digit sum is 2 + 3 + 1 + 6 = 12. Since 12 = 3 \times 4, the number is divisible by 3: groups of 3 use every bead, 2316 \div 3 = 772 of them.
But 12 is not divisible by 9; it is 9 + 3, remainder 3. So groups of 9 leave 3 beads over. Check: 9 \times 257 = 2313, and 2316 - 2313 = 3. A number can pass the test for 3 and fail the test for 9: the digit sum 12 is four groups of 3, and three of them make one group of 9, but the fourth group of 3 is left over.
A digit sum taken twice
Is 987{,}654{,}321 divisible by 9?
SolutionThe digit sum is 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 45. That is small enough to know already, but the test can be used again on 45: its digit sum is 4 + 5 = 9, which is divisible by 9. So 45 is divisible by 9, and therefore so is 987{,}654{,}321.
Long division confirms it with nine steps of work: 987{,}654{,}321 = 9 \times 109{,}739{,}369. The digit sum needed only additions.
A hidden digit
Dmitri’s bead count is a three-digit number. He remembers the first digit is 4 and the last is 7, but not the middle one, so write it as 4\square7. He knows the beads made bracelets of 9 with none left over. What can the missing digit be? And which digits would work if he had used groups of 3 instead?
SolutionCall the missing digit d. The digit sum is 4 + d + 7 = 11 + d. A digit is one of 0, 1, \ldots, 9, so 11 + d is somewhere from 11 to 20. The only multiple of 9 in that range is 18, so 11 + d = 18 and d = 7. The count was 477, and 477 = 9 \times 53.
For groups of 3, 11 + d must be a multiple of 3 from 11 to 20: that is 12, 15 or 18. So d = 1, 4 or 7, giving 417, 447 or 477. Three digits pass the test for 3 and only one of them passes the test for 9, which fits: a multiple of 9 is a multiple of 3, not the other way round.
How many beads short
Leilani has 8413 beads for bracelets of 9. How many beads are left over, and how many more must she buy so that none are left?
SolutionThe digit sum is 8 + 4 + 1 + 3 = 16, and the digit sum of 16 is 1 + 6 = 7. Each digit sum leaves the same remainder on division by 9 as the number before it, so 8413 leaves remainder 7. She has 7 beads left over.
Seven leftover beads need 2 more to make a full bracelet, so she must buy 2 beads. Check: 8415 has digit sum 8 + 4 + 1 + 5 = 18, divisible by 9, and 8415 = 9 \times 935.
Catching a wrong product
Tariq orders 46 packets of beads with 27 beads in each packet. He works out the total as 46 \times 27 = 1232. Without multiplying again, show that he has made a mistake.
SolutionSince 27 = 3 \times 9, each packet is three groups of 9 beads. So all the beads together are a whole number of groups of 9, and the true total must be divisible by 9.
The digit sum of 1232 is 1 + 2 + 3 + 2 = 8, which is not divisible by 9. So 1232 cannot be the total. The correct product is 46 \times 27 = 1242, and its digit sum is 1 + 2 + 4 + 2 = 9, as it must be. The test cannot prove a product right, since a different wrong answer could still have a digit sum of 9, but it can prove one wrong.
Boundaries
The test rests on one fact: every place value, 10, 100, 1000 and so on, is one more than a multiple of 9, and so also one more than a multiple of 3. It works for 3 and 9 because they are the numbers that divide 9 (apart from 1, which divides everything). For other divisors the digit sum says nothing. 15 has digit sum 6 but is not divisible by 6, because 10 is 6 + 4, so each ten leaves 4 over, not 1. 16 has digit sum 7 but is not divisible by 7.
It does not stretch to 27 either, even though 27 is a multiple of 9. 108 = 27 \times 4, yet its digit sum 9 is not divisible by 27.
The test reads digits written in base ten, the usual way. It tells whether 3 or 9 divides the number and what the remainder is, but not the quotient; for that you still divide. For 0 the digit sum is 0, and 0 = 9 \times 0 really is divisible by 3 and by 9.
Where this goes next
The two tests are used straight away in the rest of this unit. Listing every factor of a number, as in factors and multiples, means asking whether 3 and 9 go in, and the digit sum answers at a glance. The sieve of Eratosthenes crosses out the multiples of 3, and prime factorization splits off threes from large numbers. The greatest common factor and least common multiple build on those lists. The idea behind the proof, that a number and its digit sum leave the same remainder, also gives a check on sums and products called casting out nines; Example 7 used it to catch a wrong product.
Exercises
Testing for three and nine
For each number, say whether it is divisible by 3, by 9, by both, or by neither.
- 252
- 4101
- 7777
- 60{,}903
- 123{,}456
- 888{,}888
Beads left over
- Hana has 517 beads and makes bracelets of 9. How many beads are left over?
- Felipe has 2030 beads and threads them in groups of 3. How many are left over?
- Tariq has 6284 beads for bracelets of 9. What is the smallest number of beads he can buy so that none are left over?
- Leilani has 1{,}000{,}000 beads. How many are left over in groups of 9? In groups of 3?
- Amara has 3456 beads. Show that bracelets of 9 use every bead, and find how many bracelets she makes.
Hidden digits
- Find every digit that can go in the box so that 5\square2 is divisible by 9.
- Find every digit that can go in the box so that 5\square2 is divisible by 3.
- The number 38\square is divisible by 3 and is even. Find the missing digit.
- The same digit goes in both boxes of 4\square5\square. Find every digit that makes the number divisible by 9, and write out the numbers.
Using the tests
- What is the smallest four-digit number divisible by 3? By 9?
- Dmitri’s bead count is between 200 and 220, it fills bracelets of 9 with none over, and it is even. How many beads does he have?
- Hana works out 38 \times 18 = 674 for the beads in 38 bracelets of 18. Use a digit sum to show she is wrong, then find the right product.
- Felipe has 5834 beads and Amara has 8345. Without dividing, find how many each has left over in groups of 9.
Reasoning
- Explain why 1000 is one more than a multiple of 9, and use it to explain why 6000 leaves the same remainder as 6 when divided by 9.
- Leilani says, “A number is divisible by 9 when its last digit is 9.” Give one number that shows this is false and one number that shows a multiple of 9 need not end in 9.
- Explain why every number divisible by 9 is divisible by 3. Give a number divisible by 3 but not by 9.
- Tariq notices that 24 has digit sum 6 and is divisible by 6, and guesses that the digit-sum test works for 6. Find a number with digit sum 6 that is not divisible by 6, and explain why the test works for 3 and 9 but not for 6.
- Write the digits of a three-digit number as a, b, c, so the number is 100a + 10b + c. Show that the number minus its digit sum is a multiple of 9.
Answers
- Both. Digit sum 2 + 5 + 2 = 9, divisible by 9 and so by 3; 252 = 9 \times 28.
- By 3 only. Digit sum 4 + 1 + 0 + 1 = 6, divisible by 3 but not by 9; 4101 = 3 \times 1367.
- Neither. Digit sum 28 = 3 \times 9 + 1, not divisible by 3, so not by 9 either.
- Both. Digit sum 6 + 0 + 9 + 0 + 3 = 18; 60{,}903 = 9 \times 6767.
- By 3 only. Digit sum 1 + 2 + 3 + 4 + 5 + 6 = 21 = 3 \times 7, but 21 is not divisible by 9.
- By 3 only. Digit sum 6 \times 8 = 48 = 3 \times 16, and 48 = 9 \times 5 + 3 is not divisible by 9.
- 4 beads. Digit sum 5 + 1 + 7 = 13 = 9 + 4; check 517 = 9 \times 57 + 4.
- 2 beads. Digit sum 2 + 0 + 3 + 0 = 5 = 3 + 2; check 2030 = 3 \times 676 + 2.
- 7 beads. Digit sum 6 + 2 + 8 + 4 = 20, which leaves remainder 2, so 2 beads are over and 7 more complete a bracelet; 6291 = 9 \times 699.
- 1 left over both times. The digit sum is 1, which leaves remainder 1 on division by 9 and by 3.
- 384 bracelets. Digit sum 3 + 4 + 5 + 6 = 18, divisible by 9, so no beads are over; 3456 \div 9 = 384.
- 2. Digit sum 7 + d runs from 7 to 16, and the only multiple of 9 there is 9, so d = 2: 522 = 9 \times 58.
- 2, 5 or 8. Digit sum 7 + d must be 9, 12 or 15, giving 522, 552, 582.
- 4. Digit sum 11 + d must be 12, 15 or 18, so d is 1, 4 or 7; only 4 is even, giving 384.
- 0 or 9, giving 4050 and 4959. Digit sum 4 + d + 5 + d = 9 + d + d, so d + d must be 0, 9 or 18; 9 is odd, so d = 0 or d = 9.
- 1002 and 1008. 1000 has digit sum 1; adding 1 each time, 1002 reaches digit sum 3 and 1008 reaches digit sum 9.
- 216. The multiples of 9 from 200 to 220 are 207 and 216 (digit sums 9 and 9); 207 is odd.
- 684. 18 = 2 \times 9, so the product is divisible by 9, but 6 + 7 + 4 = 17 is not; 38 \times 18 = 684, digit sum 18.
- 2 each. Both have digits 3, 4, 5, 8, so digit sum 20, remainder 2; 5834 = 9 \times 648 + 2 and 8345 = 9 \times 927 + 2.
- 1000 = 999 + 1 and 999 = 9 \times 111. So 6000 = 6 \times 999 + 6: six lots of 999 are a multiple of 9, leaving 6, the same remainder as 6.
- 19 ends in 9 but 19 = 9 \times 2 + 1; 18 = 9 \times 2 is a multiple of 9 ending in 8.
- A group of 9 is three groups of 3, so a number made of whole groups of 9 is made of whole groups of 3. 12 = 3 \times 4 is divisible by 3 but leaves 3 over in groups of 9.
- 15 (digit sum 6, but 15 = 6 \times 2 + 3). The test needs each place value to leave exactly 1 over. 10 = 9 + 1 and 10 = 3 \times 3 + 1, but 10 = 6 + 4 leaves 4 over, so each ten leaves 4 over in groups of 6, while the digit sum counts only 1 for it.
- 100a + 10b + c - (a + b + c) = 99a + 9b. That is a lots of 99 and b lots of 9. Each 99 is 11 groups of 9, so a lots of 99 are 11 \times a groups of 9, and the b lots of 9 are b more groups. Every part is whole groups of 9, so the difference is a multiple of 9. (For 352: 352 - 10 = 342 = 9 \times 38.)