Thursday, June 18, 2015

Divisibility Rules

When you were younger, you probably learned to skip count by 2, 5, and 10.  Skip counting by 2 leads to the sequence 2, 4, 6, 8, 10, 12, 14, (and so on); skip counting by 5 leads to 5, 10, 15, 20, 25, 30, (and so on); and skip counting by 10 leads to 10, 20, 30, 40, 50, (and so on).  If you were an observant student, you may have noticed that all the numbers in the skip counting sequence for 10 ended in a 0, all the numbers in the skip counting sequence for 5 ended in either a 0 or 5, and all the numbers in the skip counting sequence for 2 ended in either a 0, 2, 4, 6, or 8. 


2, 5, and 10

In effect, you observed divisibility rules for 2, 5, and 10: if a number ends in 0, 2, 4, 6, or 8, then that number is divisible by 2 (or even); if a number ends in a 0 or 5, then that number is divisible by 5; and if a number ends in 0, then that number is divisible by 10

The reason for these simple divisibility rules for 2, 5, and 10 is because our numbering system is in base 10, which itself is divisible by 2, 5, and 10.  Mathematically, we know that 625 is divisible by 5 because 625 = 62 x 10 + 5 = 5 x (62 x 2 + 1).  In general, the number comprised of all the digits before the last one must be divisible by 10 (and also 5 and 2) because of our base 10 numbering system, which means only the last digit needs to be tested for divisibility.

4

There are also divisibility rules for other numbers that are not so obvious.  Since 4 divides into 100, if the last two digits of a number are divisible by 4, then the entire number is divisible by 4.  For example, 714,036 is divisible by 4 because the last two numbers (36) are divisible by 4.  Mathematically, 714,036 = 7140 x 100 + 36 = 7140 x 25 x 4 + 9 x 4 = 4 x (7140 x 25 + 9). 

8

Since 8 divides into 1000, if the last three digits of a number are divisible by 8, then the entire number is divisible by 8.  For example, 714,032 is divisible by 8 because the last three numbers (032) is divisible by 8.  Mathematically, 714032 = 714 x 1000 + 32 = 714 x 125 x 8 + 4 x 8 = 8 x (714 x 125 + 4).

3

Although the number 3 does not divide into any multiple of 10 like the other numbers we have looked at (2, 4, 5, 8, and 10), it does, however, divide into 9, and 99, and 999 (and so on), which are all exactly one less than a multiple of 10.  This property allows us to make the following divisibility rule for 3: if the digits of a number add up to a multiple of 3, then that number is divisible by 3.  For example, the number 531 is divisible by 3 because the digits add up to 5 + 3 + 1 = 9 which is a multiple of 3.  Mathematically, 531 = 5 x 100 + 3 x 10 + 1 = 5 x (99 + 1) + 3 x (9 + 1) + 1 = 5 x 99 + 5 x 1 + 3 x 9 + 3 x 1 + 1 = 5 x 99 + 3 x 9 + 5 + 3 + 1 = 5 x 33 x 3 + 3 x 3 x 3 + 5 + 3 + 1 = 3 x (5 x 33 + 3 x 3) + 5 + 3 + 1.  Therefore, if the digits 5 + 3 + 1 add up to a multiple of 3, the entire number must be a multiple of 3.

9

A similar divisibility rule for 3 can be made for the number 9, since 9 also divides into 9, 99, 999, (and so on).  If the digits of a number add up to a multiple of 9, then that number is divisible by 9.    For example, 648 is divisible by 9 because 6 + 4 + 8 = 18 which a multiple of 9.  (In fact, the rule can be applied a second time to 18, because its digits add up to 1 + 8 = 9.)  Mathematically, 648 = 6 x 100 + 4 x 10 + 8 = 6 x (99 + 1) + 4 x (9 + 1) + 8 = 6 x 99 + 6 x 1 + 4 x 9 + 4 x 1 + 8 =  6 x 99 + 4 x 9 + 6 + 4 + 8 = 6 x 11 x 9 + 4 x 9 + 6 + 4 + 8 = 9 x (6 x 11 + 4) + 6 + 4 + 8.  Therefore, if the digits 6 + 4 + 8 add up to a multiple of 9, the entire number must be a multiple of 9.  (This divisibility rule is also discussed in a previous blog.)

6

Divisibility rules for composite numbers can be made by combining rules of its (relatively prime) factors.  Since 2 x 3 = 6, the divisibility rule for 6 is the divisibility rule for 2 and 3 combined.  If the digits of a number add up to a multiple of 3, and if the number ends in 0, 2, 4, 6, or 8, then that number is divisible by 6

12

Similarly, since 3 x 4 = 12, the divisibility rule for 12 is divisibility rule for 3 and 4 combined.  If the digits of a number add up to a multiple of 3, and if the last two digits of the number are divisible by 4, then the entire number is divisible by 12.


11

Now we have found divisibility rules for the first 12 numbers other than 7 and 11.  There are divisibility rules for 7 and 11, but they are a little trickier.  First let us examine the divisibility rule for 11, which is less tricky than 7.  Powers of ten are alternately one less and one more than a multiples of 11.  In other words, 10 = 11 – 1, 102 = 100 = 99 + 1 = 11 x 9 + 1, 103 = 1000 = 1001 – 1 = 11 x 91 – 1, 104 = 10000 = 9999 + 1 = 11 x 909 + 1, and so on.  This unique property allows us to make the following divisibility rule for 11: if the digits of a number alternately add and subtract to a multiple of 11, then that number is divisible by 11. For example, 363 is divisible by 11 because 3 – 6 + 3 = 0 which is a multiple of 11.  Mathematically, 363 = 3 x 100 + 6 x 10 + 3 = 3 x (99 + 1) + 6 x (11 – 1) + 3 = 3 x 99 + 3 x 1 + 6 x 11 – 6 x 1 + 3 = 3 x 99 + 6 x 11 + 3 – 6 + 3 = 3 x 9 x 11 + 6 x 11 + 3 – 6 + 3 = 11 x (3 x 9 + 6) + 3 – 6 + 3.  Therefore, if the digits alternately add and subtract to a multiple of 11, the entire number must be a multiple of 11.

7

There are two divisibility rules for 7 that can either be used or combined depending on convenience.  Fortunately, 7 is divides into 1,001, which is 103 + 1.  That also means that it divides into (103 + 1)(103 – 1) = 106 – 1 = 999,999.  It also divides into (103 + 1)(106 – 103 + 1) = 109 + 1 = 1,000,000,001.  Carrying on in this fashion, we can show that 7 divides into 106n – 3 + 1 and 106n – 1 for any positive integer n.  Much like 11 (which divides into 102n – 1 + 1 and 102n – 1 for any positive integer n), if every three digits of a number alternately add or subtract to a multiple of 7, then that number is divisible by 7.  For example, 127,311,212 is divisible by 7 because 127 – 311 + 212 = 28 which is a multiple of 7.  Mathematically, 127,311,212 = 127 x 1,000,000 + 311 x 1,000 + 212 = 127 x (999,999 + 1) + 311 x (1,001 – 1) + 212 = 127 x 999,999 + 127 x 1 + 311 x 1,001 – 311 x 1 + 212 = 127 x 999,999 + 311 x 1,001 + 127 – 311 + 212 = 127 x 142857 x 7 + 311 x 143 x 7 + 127 – 311 + 212 = 7 x (127 x 142857 + 311 x 143) + 127 – 311 + 212.  Therefore, if every three digits alternately add and subtract to a multiple of 7, the entire number must be a multiple of 7.  (The number 142857 found in the above calculations is a cyclic number related to repeating powers and repeating decimals, which is discussed in a previous blog.)

This trick of alternately adding and subtracting three digits can be used multiple times in succession, but it can sometimes lead to three-digit numbers that are not obviously multiples of 7 at first glance, and so another trick is needed to test these three-digit numbers.  We can use the fact that 21 is a multiple of 7 for a second divisibility rule for 7 that will help with these three-digit numbers: if 2 times the last digit subtracted from the remaining digits is a multiple of 7, then that number is divisible by 7.  For example, 231 is divisible by 7 because 23 – 2 x 1 = 21 which is a multiple of 7.  Mathematically, 231 = 23 x 10 + 1 = 23 x 10 + 1 – 21 + 21 = 23 x 10 – 20 + 21 = 10 x (23 – 2 x 1) + 21 = 10 x (23 – 2 x 1) + 3 x 7.  Therefore, if 23 – 2 x 1 is a multiple of 7, the entire number must be a multiple of 7.  Both of these divisibility rules for 7 can be combined more than one way if needed.

Summary

A summary of all the divisibility rules discussed in this article can be found in the following table:

#
Divisibility Rule
2
If a number ends in 0, 2, 4, 6, or 8, then that number is divisible by 2.
3
If the digits of a number add up to a multiple of 3, then that number is divisible by 3.
4
If the last two digits of a number are divisible by 4, then the entire number is divisible by 4.
5
If a number ends in a 0 or 5, then that number is divisible by 5.
6
If the digits of a number add up to a multiple of 3, and if the number ends in 0, 2, 4, 6, or 8, then that number is divisible by 6.
7
If every three digits of a number alternately add or subtract to a multiple of 7, then that number is divisible by 7.
If 2 times the last digit subtracted from the remaining digits is a multiple of 7, then that number is divisible by 7.
8
If the last three digits of a number are divisible by 8, then the entire number is divisible by 8.
9
If the digits of a number add up to a multiple of 9, then that number is divisible by 9.
10
If a number ends in 0, then that number is divisible by 10.
11
If the digits of a number alternately add and subtract to a multiple of 11, then that number is divisible by 11.
12
If the digits of a number add up to a multiple of 3, and if the last two digits of the number are divisible by 4, then the entire number is divisible by 12.

These rules have several applications, which include testing a number to be prime, as well as providing a convenient way to mentally check mathematical solutions.

No comments:

Post a Comment