A rule you know, and the reason behind it

Add up the digits of a number. If the total is a multiple of 99, so is the number. Almost everyone learns this rule in school, but hardly anyone is told why it works. In this lesson you will see why, and the key is a simple fact: 10,100,1000,…10, 100, 1000, \ldots are each one more than a multiple of 99. The same idea, with 1010 being one less than a multiple of 1111, gives the alternating-sum test for 1111. After that we look at how to combine tests for composite divisors, and at the digital root.

Writing a number in algebra

A four-digit number with digits d,c,b,ad, c, b, a (from thousands down to units) is 1000d+100c+10b+a1000d + 100c + 10b + a. Every place except the units is a multiple of 1010. So the number is divisible by 1010 exactly when a=0a = 0, by 55 exactly when aa is 00 or 55, and by 22 exactly when aa is even. Since 100100 is a multiple of 44, divisibility by 44 depends only on 10b+a10b + a, the last two digits. And since 10001000 is a multiple of 88, divisibility by 88 depends only on the last three.

The test for 99

Any number written using only the digits 00 and 99, such as 909909, 99909990 or 9000990009, is a multiple of 99, because each term of its expansion is either 9×9 \times (a place value) or 00. But the last digit on its own tells you nothing: 9999 and 109109 both end in 99, and only one of them is a multiple of 99.

So let us divide the place values by 99 and see what is left over:

1=0+1,10=9+1,100=99+1,1000=999+1,…1 = 0 + 1, \quad 10 = 9 + 1, \quad 100 = 99 + 1, \quad 1000 = 999 + 1, \quad \ldots

Every place value is one more than a multiple of 99. That means

A row of 10 unit squares with 9 shaded blue and 1 orange, and a 10 by 10 grid of 100 squares with 99 blue and 1 orange, showing 10 = 9 + 1 and 100 = 99 + 1.
Ten is 9 + 1 and a hundred is 99 + 1

5000+300+40+6=5(999+1)+3(99+1)+4(9+1)+6=(5⋅999+3⋅99+4⋅9)+(5+3+4+6)5000 + 300 + 40 + 6 = 5(999 + 1) + 3(99 + 1) + 4(9 + 1) + 6 = (5 \cdot 999 + 3 \cdot 99 + 4 \cdot 9) + (5 + 3 + 4 + 6)

The first bracket is a multiple of 99. So the number is 5+3+4+6=185 + 3 + 4 + 6 = 18 more than a multiple of 99, and since 1818 is itself a multiple of 99, 53465346 is divisible by 99. The digit sum is exactly the "leftover" part.

Rule. A number is divisible by 99 if and only if its digit sum is. Better still, the remainder when you divide by 99 equals the remainder of the digit sum, and you can keep taking digit sums as many times as you like.

Example 1. 74187418 has digit sum 2020, which in turn gives 22. So the remainder is 22, and it is not divisible.

Example 2. What is the smallest multiple of 99 that uses only even digits? The digit sum must be an even multiple of 99, so at least 1818. Three even digits adding to 1818, with the smallest possible leading digit, give 288288.

Example 3. Which multiple of 99 is nearest to 50005000? The digit sum is 55, so 50005000 is 55 above a multiple of 99. That multiple is 49954995, and the next one is 50045004. You might think 49954995 is nearer, but compare the gaps: 5000−4995=55000 - 4995 = 5 and 5004−5000=45004 - 5000 = 4. So the nearest is 50045004.

It is worth checking that the rule works in every direction. Here are four statements, and each one is correct. "If the number is divisible, its digit sum is divisible" ✓. "If the digit sum is divisible, the number is divisible" ✓. "If the number is not divisible, its digit sum is not divisible" ✓, which is just the second statement turned around. "If the digit sum is not divisible, the number is not divisible" ✓.

The test for 33

Each place value is also one more than a multiple of 33, since 9,99,9999, 99, 999 are all multiples of 33. So a number is divisible by 33 if and only if its digit sum is, and the remainder on division by 33 is the remainder of the digit sum.

The test for 1111

This time the place values take turns:

1=0+1,10=11−1,100=99+1,1000=1001−1,10000=9999+1,…1 = 0 + 1, \quad 10 = 11 - 1, \quad 100 = 99 + 1, \quad 1000 = 1001 - 1, \quad 10000 = 9999 + 1, \ldots

The units, hundreds, ten-thousands, and so on are one more than a multiple of 1111, while the tens, thousands, and so on are one less. So a number sits (sum of digits in the "more" places) minus (sum of digits in the "less" places) away from a multiple of 1111.

Example 4. Take 6 1 9 4 86\,1\,9\,4\,8 (digits read from the left). Starting from the units: 88 (more), 44 (less), 99 (more), 11 (less), 66 (more). The excess is 8+9+6=238 + 9 + 6 = 23 and the shortfall is 4+1=54 + 1 = 5, a difference of 1818, which is 77 more than 1111. So 6194861948 leaves remainder 77 when divided by 1111.

Example 5. For 9 0 8 6 09\,0\,8\,6\,0: 0−6+8−0+9=110 - 6 + 8 - 0 + 9 = 11, so it is divisible by 1111.

Rule. Put alternating ++ and −- signs in front of the digits, starting with ++ at the units, and work out the total. If the result is 00 or a multiple of 1111 (positive or negative), the number is divisible by 1111. Otherwise, bring the result into the range 00 to 1010 by adding or subtracting 1111, and that is the remainder.

Composite divisors

Divisible by 66 means divisible by 22 and by 33, so you check the last digit and the digit sum. Divisible by 1818 means divisible by 22 and by 99. Divisible by 4444 means divisible by 44 and by 1111.

Here is a trap, though. Being divisible by 44 and by 66 does not guarantee divisibility by 2424: 3636 passes both tests and fails. The factors you use must be coprime and must multiply to the divisor. For 2424, use 33 and 88 (3×8=243 \times 8 = 24, with no common factor). In prime terms, 24=23×324 = 2^3 \times 3. The test for 88 supplies the 232^3 and the test for 33 supplies the 33, whereas 44 and 66 together supply only 22×3=122^2 \times 3 = 12.

Example 6. Is 4 3 7 5 84\,3\,7\,5\,8 divisible by 1818? It is even ✓, and its digit sum is 2727 ✓. Yes.

Digital roots

Keep adding the digits until only one digit remains, and you have the digital root. For example, 489710→29→11→2489710 \to 29 \to 11 \to 2. From the test for 99, the digital root is just the remainder on division by 99, with one exception: a multiple of 99 has digital root 99, not 00.

Adding 99 never changes the digital root, and adding 11 raises it by 11 (going from 99 back round to 11). So consecutive numbers cycle through 1,2,…,91, 2, \ldots, 9. Multiples of 33 have digital roots 3,6,93, 6, 9 in turn, and multiples of 66 have 6,3,96, 3, 9.

Example 7. What is the digital root of 9a+36b+139a + 36b + 13? The first two terms are multiples of 99, and 13→413 \to 4, so the digital root is 44 for every whole a,ba, b.

This is an old trick. Āryabhaṭa II (c. 950 CE) describes the digital root in the Mahāsiddhānta as a way of checking arithmetic: the digital root of a sum equals the digital root of the sum of the digital roots.

Practice

  1. Without dividing, find the remainder on division by 99: 2 5 7 12\,5\,7\,1; 8 0 0 4 68\,0\,0\,4\,6; 1 9 9 9 9 81\,9\,9\,9\,9\,8.
  2. Find the remainder on division by 33 of 7 7 7 7 7 7 77\,7\,7\,7\,7\,7\,7 and of 4 0 5 2 14\,0\,5\,2\,1.
  3. Find the smallest multiple of 99 whose digits are all 22s and 55s.
  4. The multiple of 99 nearest to 32103210?
  5. How many multiples of 99 lie between 70007000 and 71007100?
  6. Test for divisibility by 1111, giving the remainder if not divisible: 3 0 83\,0\,8; 9 1 7 49\,1\,7\,4; 5 2 8 1 7 65\,2\,8\,1\,7\,6; 1 0 0 0 0 11\,0\,0\,0\,0\,1.
  7. Which of these is divisible by 66? by 1212? by 3636? 8 6 5 28\,6\,5\,2; 4 1 0 44\,1\,0\,4; 9 7 2 09\,7\,2\,0.
  8. Explain why checking divisibility by 22 and by 99 suffices for 1818 but checking 33 and 66 does not.
  9. Find the digital roots of 7 6 5 4 3 27\,6\,5\,4\,3\,2 and of 1 05+81\,0^{5} + 8. What are the digital roots of the numbers 50,51,52,…,6050, 51, 52, \ldots, 60?
  10. What is the digital root of 18k+27m+2018k + 27m + 20 for whole numbers k,mk, m?

Answers

Show answers
  1. 15→615 \to 6; 18→018 \to 0 (divisible); 45→045 \to 0 (divisible).
  2. 49→13→4→149 \to 13 \to 4 \to 1; 12→012 \to 0.
  3. We need a digit sum that is a multiple of 99 using 22s and 55s: 2+2+5=92 + 2 + 5 = 9, and the smallest arrangement is 225225.
  4. Digit sum 66: 32103210 is 66 above 32043204 and 33 below 32133213: 32133213.
  5. From 70027002 (digit sum 99) to 70927092: 7002,7011,…,70927002, 7011, \ldots, 7092, which makes eleven.
  6. 308308: 8−0+3=118 - 0 + 3 = 11: divisible. 91749174: 4−7+1−9=−114 - 7 + 1 - 9 = -11: divisible. 528176528176: 6−7+1−8+2−5=−116 - 7 + 1 - 8 + 2 - 5 = -11: divisible. 100001100001: 1−0+0−0+0−1=01 - 0 + 0 - 0 + 0 - 1 = 0: divisible.
  7. 86528652: even, digit sum 2121: by 66 and (last two digits 5252) by 1212; not by 3636 (sum not multiple of 99). 41044104: by 66, by 1212 (0404), by 3636 (digit sum 99, and 0404 divisible by 44). 97209720: by 66, by 1212, by 3636.
  8. 22 and 99 are coprime with product 1818. 33 and 66 share the factor 33, and together they only guarantee LCM(3,6)=6\text{LCM}(3, 6) = 6; for instance, 3030 passes both.
  9. 27→927 \to 9; 100008→9100008 \to 9. Digital roots of 5050 to 6060: 5,6,7,8,9,1,2,3,4,5,65, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6.
  10. 18k+27m18k + 27m is a multiple of 99, and 20→220 \to 2: digital root 22.