5.2 Checking Divisibility Quickly

You already own quick tests for 2, 5, 10, 4 and 8. Writing a number by place value explains them all. A number \dots dcba means \dots + 1000d + 100c + 10b + a. Every place but the units is a multiple of 10, so the whole number is divisible by 10 exactly when the units digit a=0. The same expansion accounts for 2, 5, 4 and 8. Let us now construct tests for the trickier numbers 9, 3 and 11.

A shortcut for divisibility by 9

Each power of 10 sits just one above a string of nines: 1 = 0+1,\quad 10 = 9+1,\quad 100 = 99+1,\quad 1000 = 999+1,\quad \dots The “nines part” is always a multiple of 9, so each place value leaves remainder 1 on division by 9, and each digit hands its own value to the remainder. For instance, 8407 = 8(999+1)+4(99+1)+0(9+1)+7 = \underbrace{(8\cdot999+4\cdot99)}_{\text{multiple of }9} + (8+4+0+7). So 8407 is 8+4+0+7 = 19 more than a multiple of 9. Adding again, 1+9 = 10, then 1+0 = 1: the remainder is 1.

The 9-test A number is divisible by 9 if and only if the sum of its digits is divisible by 9. Adding the digits repeatedly down to one digit gives the remainder on division by 9 (with 9 itself standing for remainder 0).

Which of these are correct? (i) If a number is divisible by 9, its digit sum is divisible by 9, true. (ii) If the digit sum is divisible by 9, the number is divisible by 9, true. (iii) If a number is not divisible by 9, its digit sum is not divisible by 9, true (the contrapositive of (ii)). (iv) If the digit sum is not divisible by 9, the number is not divisible by 9, true (the contrapositive of (i)).

A shortcut for divisibility by 3

Every multiple of 9 is a multiple of 3, but there are extra multiples of 3 (like 15, 33, 87). The point is that each power of 10 is also one more than a multiple of 3 (10 = 9+1, 100 = 99+1, …, and 9, 99, \dots are multiples of 3). So the identical digit-sum argument applies:

The 3-test A number is divisible by 3 if and only if the sum of its digits is divisible by 3.

A shortcut for divisibility by 11

For 11 the place values alternate between one above and one below a multiple of 11: 1 = 11\cdot0 + 1,\quad 10 = 11\cdot1 - 1,\quad 100 = 11\cdot9 + 1,\quad 1000 = 11\cdot91 - 1,\ \dots So the units, hundreds, ten-thousands… digits count as “excess”, while the tens, thousands, hundred-thousands… digits count as “shortfall”. Take the difference.

Worked Example

Is 471295 divisible by 11? The neat version: place alternating + and - signs beginning at the units digit: 5 - 9 + 2 - 1 + 7 - 4 = 0. An alternating sum of 0 means 471295 lands exactly on a multiple of 11, so it is divisible by 11.

And 638573? Alternating from the units: 3 - 7 + 5 - 8 + 3 - 6 = -10. Since -10 is neither 0 nor a multiple of 11, the number is not divisible by 11; converting -10 to a remainder gives 11-10 = 1.

The 11-test Form the alternating sum of the digits (begin at the units digit with +). The number is divisible by 11 if and only if this alternating sum is 0 or a multiple of 11.

A bonus shortcut for divisibility by 7

The test for 7 is less famous but just as tidy. Chop off the units digit, double it, and subtract it from the rest. Repeat until you reach a small number. The original is divisible by 7 exactly when the result is.

Worked Example

Is 168 divisible by 7? Strip the units digit 8: rest = 16, twice the units = 16, so 16 - 16 = 0. The result 0 is divisible by 7, hence so is 168 (indeed 168 = 7\times24). Yes.

Is 2594 divisible by 7? Strip the 4: 259 - 8 = 251. Strip the 1: 25 - 2 = 23. Since 23 is not a multiple of 7, no.

Why it works: write the number as 10t + u (with t the “rest” and u the units digit). Then 10t + u = 10(t - 2u) + 21u. Since 21u is a multiple of 7, the number 10t+u is divisible by 7 exactly when 10(t-2u) is; and as 10 shares no factor with 7, that happens exactly when t-2u itself is divisible by 7.

Combining tests

Can we test divisibility by 6 using its factors 2 and 3? Yes, because 6 = 2\times3 and 2,3 share no common factor. But for 24 the factor pair 4 and 6 does not work: 12 is divisible by both 4 and 6 yet not by 24. The reason lives in the prime factorisation: 24 = 2^3\times3 needs three 2’s, but 4 = 2^2 and 6 = 2\times3 overlap in one of those 2’s, so together they only guarantee 2^2\times3 = 12. To test for 24 properly, use 3 and 8 (since 24 = 8\times3 and \gcd(8,3)=1).

Now that all four tests are in your pocket, put any number through the explorer below and watch the 3, 9, 11 and 7 tests fire at once.

Divisibility & Digital-Root Explorer

Type a whole number and see why the 3, 9, 11 and 7 tests give what they give.

Figure it Out: Divisibility

Practice

  1. Without dividing, which are divisible by 9?   (i) 246   (ii) 531   (iii) 7777   (iv) 82394   (v) 471960
  2. Find the smallest multiple of 9 with no odd digits.
  3. Find the multiple of 9 closest to 5000.
  4. How many multiples of 9 lie between 7300 and 7400?
  5. Using the alternating-sum rule, test for divisibility by 11 and find the remainder if any:   (i) 264   (ii) 376   (iii) 619   (iv) 4928   (v) 50919   (vi) 638573
  6. Use the “double-and-subtract” test for 7: is (i) 322 and (ii) 4179 divisible by 7?
  1. Digit sums: 246\to12, 531\to9, 7777\to28, 82394\to26, 471960\to27. Those with a digit sum divisible by 9 are (ii) 531 and (v) 471960; only these are divisible by 9.
  2. Even digits are 2,4,6,8. A digit sum of 9 (odd) is unreachable using only even digits, so the smallest possible digit sum is 18; the even digits summing to 18 with the fewest digits are (2,8,8), arranged smallest as 288.
  3. 5004 (5004 = 9\times556; it is 4 above 5000, while the nearest below is 4995, which is 5 away, so 5004 is closer).
  4. 11 multiples (7308, 7317, \dots, 7398).
  5. Alternating sums (from units): (i) 4-6+2 = 0divisible by 11; (ii) 6-7+3 = 2 → remainder 2; (iii) 9-1+6 = 14, and 14-11=3 → remainder 3; (iv) 8-2+9-4 = 11divisible by 11; (v) 9-1+9-0+5 = 22 = 11\times2divisible by 11; (vi) 3-7+5-8+3-6 = -10 → remainder $11-10 = $ 1.
    1. 322: 32 - 2\times2 = 28 = 7\times4divisible by 7. (ii) 4179: 417 - 2\times9 = 399; then 39 - 2\times9 = 21 = 7\times3divisible by 7.

Digital roots

The digital root of a number is what you reach by adding its digits over and over until one digit remains. For 573620: 5+7+3+6+2+0 = 23, then 2+3 = 5. So its digital root is 5.

From the 9-test we already hold the secret: the digital root equals the remainder on division by 9 (with a digital root of 9 signalling that the number is an exact multiple of 9). This is exactly why digital roots were once used to check arithmetic, the Indian astronomer Aryabhata II (around 950 CE) recorded the method in his treatise the Mahāsiddhānta.

Casting out nines Because digital roots track remainders modulo 9, they reveal slips: if you claim A\times B = C, then \text{droot}(A)\times\text{droot}(B) and \text{droot}(C) must agree modulo 9. Traders and astronomers leaned on this “casting out nines” trick for centuries to catch errors in long computations, a fast sanity check, though it cannot, on its own, prove a calculation fully correct.

Math Talk Write the digital roots of 12 numbers in a row, what do you spot? (They cycle 1,2,\dots,9,1,2,\dots.) What are the digital roots of consecutive multiples of 3? Of 6? Then this riddle: “My digits are all nines; the count of my digits, the sum of my digits, and my digital root all keep pointing back to nine.” (For example 999999999, built from nine nines, see solutions.)

Figure it Out: Digital Roots

Practice

  1. The digital root of an 8-digit number is 4. What is the digital root of 100 more than that number?
  2. Start with any number and keep adding 11. What happens to the digital roots of the sequence?
  3. What is the digital root of 9a + 27b + 16?
  4. Make conjectures about (i) the parity of a number versus its digital root; (ii) the digital root of a number versus its remainder on division by 3 or 9.
  1. Adding 100 adds 1+0+0 = 1 to the digit sum, so the digital root becomes 4+1 = \mathbf{5}.
  2. Adding 11 adds 1+1 = 2 to the digit sum each time, so the digital roots step up by 2 (mod 9): e.g. starting at 10 they run 1,3,5,7,9,2,4,6,8,1,\dots, they sweep through every value 19.
  3. 9a+27b+16 = 9(a+3b+1)+7. The first part is a multiple of 9 (contributing 0/9), leaving remainder 7, so the digital root is 7.
    1. No fixed link between parity and digital root (both even and odd numbers can have, say, digital root 4). (ii) Digital roots \{1,4,7\} leave remainder 1 on division by 3; \{2,5,8\} leave remainder 2; \{3,6,9\} leave remainder 0. On division by 9, the remainder equals the digital root (with 9 meaning remainder 0).