A rule you know, and the reason behind it
Add up the digits of a number. If the total is a multiple of , 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: are each one more than a multiple of . The same idea, with being one less than a multiple of , gives the alternating-sum test for . 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 (from thousands down to units) is . Every place except the units is a multiple of . So the number is divisible by exactly when , by exactly when is or , and by exactly when is even. Since is a multiple of , divisibility by depends only on , the last two digits. And since is a multiple of , divisibility by depends only on the last three.
The test for
Any number written using only the digits and , such as , or , is a multiple of , because each term of its expansion is either (a place value) or . But the last digit on its own tells you nothing: and both end in , and only one of them is a multiple of .
So let us divide the place values by and see what is left over:
Every place value is one more than a multiple of . That means

The first bracket is a multiple of . So the number is more than a multiple of , and since is itself a multiple of , is divisible by . The digit sum is exactly the "leftover" part.
Rule. A number is divisible by if and only if its digit sum is. Better still, the remainder when you divide by equals the remainder of the digit sum, and you can keep taking digit sums as many times as you like.
Example 1. has digit sum , which in turn gives . So the remainder is , and it is not divisible.
Example 2. What is the smallest multiple of that uses only even digits? The digit sum must be an even multiple of , so at least . Three even digits adding to , with the smallest possible leading digit, give .
Example 3. Which multiple of is nearest to ? The digit sum is , so is above a multiple of . That multiple is , and the next one is . You might think is nearer, but compare the gaps: and . So the nearest is .
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
Each place value is also one more than a multiple of , since are all multiples of . So a number is divisible by if and only if its digit sum is, and the remainder on division by is the remainder of the digit sum.
The test for
This time the place values take turns:
The units, hundreds, ten-thousands, and so on are one more than a multiple of , 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 .
Example 4. Take (digits read from the left). Starting from the units: (more), (less), (more), (less), (more). The excess is and the shortfall is , a difference of , which is more than . So leaves remainder when divided by .
Example 5. For : , so it is divisible by .
Rule. Put alternating and signs in front of the digits, starting with at the units, and work out the total. If the result is or a multiple of (positive or negative), the number is divisible by . Otherwise, bring the result into the range to by adding or subtracting , and that is the remainder.
Composite divisors
Divisible by means divisible by and by , so you check the last digit and the digit sum. Divisible by means divisible by and by . Divisible by means divisible by and by .
Here is a trap, though. Being divisible by and by does not guarantee divisibility by : passes both tests and fails. The factors you use must be coprime and must multiply to the divisor. For , use and (, with no common factor). In prime terms, . The test for supplies the and the test for supplies the , whereas and together supply only .
Example 6. Is divisible by ? It is even ✓, and its digit sum is ✓. Yes.
Digital roots
Keep adding the digits until only one digit remains, and you have the digital root. For example, . From the test for , the digital root is just the remainder on division by , with one exception: a multiple of has digital root , not .
Adding never changes the digital root, and adding raises it by (going from back round to ). So consecutive numbers cycle through . Multiples of have digital roots in turn, and multiples of have .
Example 7. What is the digital root of ? The first two terms are multiples of , and , so the digital root is for every whole .
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
- Without dividing, find the remainder on division by : ; ; .
- Find the remainder on division by of and of .
- Find the smallest multiple of whose digits are all s and s.
- The multiple of nearest to ?
- How many multiples of lie between and ?
- Test for divisibility by , giving the remainder if not divisible: ; ; ; .
- Which of these is divisible by ? by ? by ? ; ; .
- Explain why checking divisibility by and by suffices for but checking and does not.
- Find the digital roots of and of . What are the digital roots of the numbers ?
- What is the digital root of for whole numbers ?
Answers
Show answers
- ; (divisible); (divisible).
- ; .
- We need a digit sum that is a multiple of using s and s: , and the smallest arrangement is .
- Digit sum : is above and below : .
- From (digit sum ) to : , which makes eleven.
- : : divisible. : : divisible. : : divisible. : : divisible.
- : even, digit sum : by and (last two digits ) by ; not by (sum not multiple of ). : by , by (), by (digit sum , and divisible by ). : by , by , by .
- and are coprime with product . and share the factor , and together they only guarantee ; for instance, passes both.
- ; . Digital roots of to : .
- is a multiple of , and : digital root .