Divisibility Rule - Wikipedia
Divisibility Rule - Wikipedia
Subtract the quantity of the digits 2, 5, and 8 in Using the example above:
the number from the quantity of the digits 1, 4, 16,499,205,854,376 has four of the
and 7 in the number. The result must be digits 1, 4 and 7 and four of the digits 2,
divisible by 3. 5 and 8; ∴ Since 4 − 4 = 0 is a multiple
of 3, the number 16,499,205,854,376 is
divisible by 3.
Twice the tens digit, plus the ones digit is 40832: 2 × 3 + 2 = 8, which is divisible
divisible by 4. by 4.
1458: 1 + 4 + 5 + 8 = 18, so it is
6 It is divisible by 2 and by 3.[6] divisible by 3 and the last digit is even,
hence the number is divisible by 6.
Adding 3 times the first digit to the next gives 483: 4×3 + 8 = 20 remainder 6,
a multiple of 7. (This works because 10a + b − 203: 2×3 + 0 = 6,
7a = 3a + b; the last number has the same
63: 6×3 + 3 = 21.
remainder.)
Multiply each digit (from right to left) by the 483,595: (4 × (-2)) + (8 × (-3)) + (3 ×
digit in the corresponding position in this (-1)) + (5 × 2) + (9 × 3) + (5 × 1) = 7.
pattern (from left to right): 1, 3, 2, -1, -3, -2
(repeating for digits beyond the hundred-
thousands place). Adding the results gives a
multiple of 7.
If the number of digits is even, add the first 918,082: the number of digits is even
and subtract the last digit from the rest. The (6) → 1808 + 9 − 2 = 1815: 81 + 1 − 5 =
result must be divisible by 11. 77 = 7 × 11
176: 1 × 4 + 76 = 80.
Add the last two digits to four times the rest.
The result must be divisible by 16. 1168: 11 × 4 + 68 = 112.
The last four digits must be divisible by 157,648: 7,648 = 478 × 16.
16.[2][3]
Subtract 5 times the last digit from the rest. 221: 22 − 1 × 5 = 17.
17 Subtract the last two digits from two times the
4,675: 46 × 2 - 75 = 17.
rest.
It is divisible by 10, and the tens digit is even. 360: is divisible by 10, and 6 is even.
20 The number formed by the last two digits is
480: 80 is divisible by 20.
divisible by 20.[3]
Add 3 times the last two digits to the rest. 1725: 17 + 25 × 3 = 92.
27 Subtract 8 times the last digit from the rest. 621: 62 − 1 × 8 = 54.
Subtract the last two digits from 8 times the 6507: 65 × 8 - 7 = 520 - 7 = 513 = 27 ×
rest. 19.
Add three times the last digit to the rest. 348: 34 + 8 × 3 = 58.
29
Add 9 times the last two digits to the rest. 5510: 55 + 10 × 9 = 145 = 5 × 29.
Step-by-step examples
Divisibility by 2
Divisibility by 3 or 9
If a number is a multiplication of 3
consecutive numbers then that number is
always divisible by 3. This is useful for
when the number takes the form of (n × (n
− 1) × (n + 1))
Ex.
Ex.
Divisibility by 4
The basic rule for divisibility by 4 is that if
the number formed by the last two digits
in a number is divisible by 4, the original
number is divisible by 4;[2][3] this is
because 100 is divisible by 4 and so
adding hundreds, thousands, etc. is simply
adding another number that is divisible by
4. If any number ends in a two digit
number that you know is divisible by 4
(e.g. 24, 04, 08, etc.), then the whole
number will be divisible by 4 regardless of
what is before the last two digits.
Ex.
General rule
Alternative example
1. 1720 (The original number)
2. 1720 ÷ 2 = 860 (Divide the original
number by 2)
3. 860 ÷ 2 = 430 (Check to see if the
result is divisible by 2)
4. 1720 ÷ 4 = 430 (If the result is
divisible by 2, then the original
number is divisible by 4)
Divisibility by 5
Divisibility by 6
Ex.
General rule
1. 324 (The original number)
2. 324 ÷ 3 = 108 (Check to see if the
original number is divisible by 3)
3. 324 ÷ 2 = 162 OR 108 ÷ 2 = 54 (Check
to see if either the original number or
the result of the previous equation is
divisible by 2)
4. 324 ÷ 6 = 54 (If either of the tests in
the last step are true, then the
original number is divisible by 6. Also,
the result of the second test returns
the same result as the original
number divided by 6)
Finding a remainder of a number when
divided by 6
(1, −2, −2, −2, −2, and −2 goes on for the
rest) No period. -- Minimum magnitude
sequence
(1, 4, 4, 4, 4, and 4 goes on for the rest) --
Positive sequence
Multiply the right most digit by the left
most digit in the sequence and multiply
the second right most digit by the
second left most digit in the sequence
and so on.
Next, compute the sum of all the values
and take the remainder on division by 6.
Divisibility by 7
20×10n − 6×10n=14×10n
60×10n − 4×10n=56×10n
40×10n − 5×10n=35×10n
50×10n − 1×10n=49×10n
Is 438,722,025 divisible by
seven? Multiplier = 5.
4 3 8 7 2 2 0 2 5
42 37 46 37 6 40 37 27
YES
01 01 01 = 10,101 / 7 =
1,443
10 10 10 = 101,010 / 7 =
14,430
111,111 / 7 = 15,873
222,222 / 7 = 31,746
999,999 / 7 = 142,857
576,576 / 7 = 82,368
Is 355,341 divisible by
seven?
355,341 − 341,341 = 14,000
(Step B) -> 014 − 000 (Step
B) -> 14 = 1 − (4×2) (Step
A) = 1 − 8 = −7 YES
Is 42,341,530 divisible by
seven?
42,341,530 -> 341,530 + 42
= 341,572 (Step C)
341,572 − 341,341 = 231
(Step B)
231 -> 23 − (1×2) = 23 − 2
= 21 YES (Step A)
Is 98 divisible by seven?
98 -> 9 remainder 2 -> 2×3
+ 8 = 14 YES
Is 355,341 divisible by
seven?
3 * 3 + 5 = 14 -> remainder
0 -> 0×3 + 5 = 5 -> 5×3 + 3
= 18 -> remainder 4 -> 4×3
+ 4 = 16 -> remainder 2 ->
2×3 + 1 = 7 YES
Find remainder of
1036125837 divided by 7
1×3 + 0 = 3
3×3 + 3 = 12 remainder 5
5×3 + 6 = 21 remainder 0
0×3 + 1 = 1
1×3 + 2 = 5
5×3 + 5 = 20 remainder 6
6×3 + 8 = 26 remainder 5
5×3 + 3 = 18 remainder 4
4×3 + 7 = 19 remainder 5
Answer is 5
Sum = 33
33 modulus 7 = 5
Remainder = 5
Example 1:
The number to be tested is 157514. First
we separate the number into three digit
pairs: 15, 75 and 14.
Then we apply the algorithm: 1 × 15 − 3 ×
75 + 2 × 14 = 182
Because the resulting 182 is less than six
digits, we add zero’s to the right side until it
is six digits.
Then we apply our algorithm again: 1 × 18
− 3 × 20 + 2 × 0 = −42
The result −42 is divisible by seven, thus
the original number 157514 is divisible by
seven.
Example 2:
The number to be tested is 15751537186.
(1 × 15 − 3 × 75 + 2 × 15) + (1 × 37 − 3 × 18
+ 2 × 60) = −180 + 103 = −77
The result −77 is divisible by seven, thus
the original number 15751537186 is
divisible by seven.
Divisibility by 13
Remainder Test 13 (1, −3, −4, −1, 3, 4,
cycle goes on.) If you are not comfortable
with negative numbers, then use this
sequence. (1, 10, 9, 12, 3, 4)
Beyond 30
Divisibility properties can be determined in
two ways, depending on the type of the
divisor.
Composite divisors
Prime divisors
Add the last two digits to 4 times the rest. 1312: (13×4) + 12 = 64.
Take the digits in blocks of three from right to 2,651,272: 2 + 651 + 272 = 925. 925 =
37 left and add each block. 37×25.
Subtract 11 times the last digit from the rest. 925: 92 − (5×11) = 37.
Sum the digits in blocks of five from right to 72,841,536,727: 7 + 28,415 + 36,727 =
41 left. 65,149 = 41×1,589.
Subtract 4 times the last digit from the rest. 738: 73 − 8 × 4 = 41.
47 Subtract 14 times the last digit from the rest. 1,642,979: 164297 − 9 × 14 = 164171,
16417 − 14 = 16403,
1640 − 3 × 14 = 1598,
159 − 8 × 14 = 47.
Add the last two digits to 6 times the rest. 705: 7 × 6 + 5 = 47.
1,127: 112+(7×5)=147.
Add 5 times the last digit to the rest.
49 147: 14 + (7×5) = 49
Add the last two digits to 2 times the rest. 588: 5 × 2 + 88 = 98.
Subtract 5 times the last digit from the rest. 204: 20-(4×5)=0
51 Subtract the last two digits from 2 times the
459: 4 × 2 - 59 = -51.
rest.
61 Subtract 6 times the last digit from the rest. 732: 73-(2×6)=61
Subtract twice the last two digits from the rest. 9112: 91 - 12×2= 67
67
Subtract 20 times the last digit from the rest. 4489: 448-9×20=448-180=268.
71 Subtract 7 times the last digit from the rest. 852: 85-(2×7)=71
81 Subtract 8 times the last digit from the rest. 162: 16-(2×8)=0
Subtract 9 times the last digit from the rest. 182: 18 - (2×9) = 0
Subtract 29 times the last digit from the rest. 291: 29 - (1×29) = 0
97
Add the last two digits to 3 times the rest. 485: (3×4)+ 85 = 97
100 Ends with at least two zeros. 14100: It has two zeros at the end.
107 Subtract 32 times the last digit from the rest. 428: 42 - (8×32) = -214
Subtract the last two digits from 7 times the 1712: 17 × 7 - 12 = 107
rest.
109 Add 11 times the last digit to the rest. 654: 65 + (11×4) = 109
121 Subtract 12 times the last digit from the rest. 847: 84 - 12 × 7 = 0
163 Add 49 times the last digit to the rest. 26569: 2656 + 441 = 3097 = 163×19.
651249: 65124+243=65367.
269 Add 27 times the last digit to the rest.
6536+189=6725. 6725=269×25.
Take the digits in blocks of five from right to 77,925,613,961: 7 + 79,256 + 13,961 =
left and add each block. 93,224 = 271×344.
271
93,224: 9,322 - 4 × 27 = 9,214,
Subtract 27 times the last digit from the rest.
921 - 4 × 27 = 813 = 271 × 3.
9541:954+1×33=954+33=987.
329 Add 33 times the last digit to the rest.
987=3×329.
331 Subtract 33 times the last digit from the rest. 22177: 2217-231=1986. 1986=6×331.
499 Add the last three digits to two times the rest. 74,351: 74 × 2 + 351 = 499.
Number must be divisible by 331 with the sum 8937: 8+7=15. 15=3×5. (Note: 9 and 3
of all digits being divisible by 3. don't have to be in the sum, they are
divisible by 3.)
893-231=662. 662=2×331.
997 Add the last three digits to three times the rest. 157,526: 157 × 3 + 526= 997
1000 Ends with at least three zeros. 2000 ends with 3 zeros
Proofs
Proofs
Proof using basic algebra
and then
Eliminating the 21 gives
For 2n or 5n:
Representing x as
Representing x as
See also
Parity (mathematics)
References
1. Gardner, Martin (September 1962).
"Mathematical Games: Tests that
show whether a large number can be
divided by a number from 2 to 12".
Scientific American. 207 (3): 232–246.
doi:10.1038/scientificamerican0962-
232 . JSTOR 24936675 .
2. This follows from Pascal's criterion.
See Kisačanin (1998), p. 100–101
3. A number is divisible by 2m, 5m or 10m
if and only if the number formed by the
last m digits is divisible by that
number. See Richmond & Richmond
(2009), p. 105
4. Apostol (1976), p. 108