What are are the tests of divisibility of various numbers?

1 Answer
Feb 14, 2016

There are many divisibility tests. Here are a few, along with how they can be derived.

  • An integer is divisible by #2# if the final digit is even.

  • An integer is divisible by #3# if the sum of its digits is divisible by 3.

  • An integer is divisible by #4# if the integer formed by the last two digits is divisible by 4.

  • An integer is divisible by #5# if the final digit is 5 or 0.

  • An integer is divisible by #6# if it is divisible by 2 and by 3.

  • An integer is divisible by #7# if subtracting twice the last digit from the integer formed by removing the last digit is a multiple of 7.

  • An integer is divisible by #8# if the integer formed by the last three digits is divisible by 8 (this can be made easier by noting that the rule is the same as for 4s if the hundreds digit is even, and the opposite otherwise)

  • An integer is divisible by #9# if the sum of the digits is divisible by 9.

  • An integer is divisible by #10# if the last digit is #0#

For these and more, take a look at the wikipedia page for divisibility rules .


Now, one may wonder about how to come up with these rules, or at least show that they actually will work. One way to do this is with a type of math called modular arithmetic .

In modular arithmetic, we pick an integer #n# as the modulus and then treat every other integer as being congruent modulo #n# to its remainder when divided by #n#. An easy way to think about this is that you can add or subtract #n# without changing the value of an integer modulo n. This is the same as how, on an analog clock, adding twelve hours results in the same time. Adding hours on a clock is addition modulo #12#.

What makes modular arithmetic very useful in determining divisibility rules is that for any integer #a# and positive integer #b#, we can say that #a# is divisible by #b# if and only if

#a-=0 " (mod b)"# (#a# is congruent to #0# modulo #b#).

Let's use this to see why the divisibility rule for #3# works. We'll do so using an example which should show the general concept. In this example, we'll see why #53412# is divisible by #3#. Remember that adding or subtracting #3# will not change the value of an integer modulo #3#.

#53412# is divisible by #3# if and only if #53412 -= 0 " (mod 3)"#

But also, because #10 -3 -3 -3 = 1#, we have #10 -= 1 " (mod 3)"#

Thus:
#53412 -= 5*10^5+3*10^4+4*10^3+1*10^2+2 " (mod 3)"#

#-= 5*1^5+3*1^4+4*1^3+1*1^2+2 " (mod 3)"#

#color(red)(-= 5+3+4+1+2 " (mod 3)")#

#-= 3*5 " (mod 3)"#

#-= 0*5 " (mod 3)"#

#-= 0 " (mod 3)"#

Thus #53412# is divisible by #3#. The step in red demonstrates why we can simply sum the digits and check that instead of trying to divide the original number by #3#.