Divisibility Criteria
Divisibility criteria are ways of telling whether one number divides another
without actually carrying the division through. Implicit in this definition is the assumption
that the criteria in question affords a simpler way than the straight division to answer the
question of divisibility. Divisibility criteria re constructed in terms of the digits that compose
a given number. To fix the notation, A will be the number whose divisibility by another
number d we are going to investigate on this page. In the decimal system,
| |
A = 10nan + 10n-1an-1 + ... + 101a1 + a0
|
an 0. We readily have several examples:
- Divisibility by 3. Let s+(A) = an + an-1 + ... + a0.
Then A is divisible by 3 iff s+(A) is.
- Divisibility by 9. With the same function s+,
A is divisible by 9 iff s+(A) is.
- Divisibility by 11. Let s±(A) = a0 - a1 + ... (-1)nan.
Then A is divisible by 11 iff s±(A) is.
They all follow from the two basic properties of the modulo arithmetic
- [A]d + [B]d = [A + B]d
- [A]d·[B]d = [A·B]d
and the fact that 10 = 1 (mod 9) and 10 = -1 (mod 11), from which we successively get
102 = 1 (mod 9) and 102 = 1 (mod 11),
103 = 1 (mod 9) and 103 = -1 (mod 11), and so on.
Note that both s+(A) and s±(A) are linear combinations
of the digits of A. This is the kind of functions we shall allow on this page. (One generalization would
be to consider other bases.)
We formalize the definition the following way:
Definition
A function f(A) = f(an, ..., a0) is called a divisibility criterion by an integer d provided, starting with some A, |f(A)| < A and A is divisible by d iff f(A) is divisible by d.
O(d) is defined as the set of all divisibility criteria by d. Here are a few examples:
- s +
O(9) and s + O(3). (Incidently, O(9) O(3). Why?)
- s±
O(11)
- f1(A) = a0
O(2) O(5)
- f2(A) = 10a1 + a0
O(4) O(25)
- f3(A) = 102a2 + 10a1 + a0
O(8) O(125)
- f4(A) = 2a1 + a0
O(4)
We have more. Indeed, since 100 = 1 (mod 11),
- f5(A) = (a1a0)10 + (a3a2)10 + (a5a4)10 + ...
O(11)
(f5 is obtained by splitting A right-to-left into 2-digit numbers.) Similarly,
- f6(A) = (a1a0)10 - (a3a2)10 + (a5a4)10 - ...
O(101)
In the same spirit,
- f7(A) = (a2a1a0)10 - (a5a4a3)10 + (a8a7a6)10 - ...
O(1001)
Interestingly, since 1001 = 7·11·13, f7 O(7) O(11) O(13). The fact may appear uninspiring
for it does not relieve one from drudging through the division by 7 or 11 or 13. However, in some cases this rule is of great help indeed:
- 2,003,008 is divisible by 7 for so is (008) - (003) + 2 = 7.
- 524784 is divisible by 13 for so is 784 - 524 = 260.
Would you rather go on with the long division?
Stuart Anderson developed a general framework for deriving divisibility criteria. In particular, he noticed that
- f8(A) = 2·(... 2·(2·(anan-1)10 + (an-2an-3)10) + (an-4an-5)10) + ...
O(7),
which holds for odd n. For even n, modification is obvious. This also follows from the fact that 102 = 2 (mod 7).
There is another approach that uses the following generalization of the Euclid's Proposition VII.30:
| |
Let a and d be mutually prime (coprime). Then d|ab is equivalent to d|b.
|
Let d be a divisor of (10c - 1) for some c. Then clearly d and c are coprime. Denote
- A1 = 10n-1an + 10n-2an-1 + ... + a1,
so that A = 10A1 + a0. We have
- Ac = (ca0 + A1) + (10c - 1)A1
from which it follows that
- f(A) = ca0 + A1
O(d)
This leads to a recursive criterion. For example, let d = 19, c = 2. Then (10c - 1) is divisible by 19. Given a number A, remove a0, add 2a0 to the remaining number A1. Proceed with these steps until you obtain a number which is obviously divisible by 19 or is obviously not divisible by 19. Whatever the case, the same will be true of the original number A. Thus, we get a sequence 12311, 1233, 129, 30. The latter is not divisible by 19. Hence neither is 12311. On the other hand, as the same calculations show, 20311 is divisible by 19. (Additional examples are available elsewhere. An ingenious example was found by Gustavo Toja from Brasil.)
References
- N.N.Vorob'ev, Criteria for Divisibility, University of Chicago Press, 1980.
Copyright © 1996-2009 Alexander Bogomolny
|