Tag Archives: Divisors

Divisibility Tests

Knowing quickly whether one number is divisible by another is a basic math skill which is very useful and serves many purposes as one studies mathematics at all levels, high or low. For many readers, this page will contain much information that you already know, but I think if you will bear with me, you will learn something that is a bit unusual. At least, I’ve never seen it in my school books on math.

I divide my presentation into three parts: primary, secondary, and the “unusual”. The primary section gives the divisibility tests, or rules for the small primes (2, 3, 5, 7, and 11); in fact, that’s why it is called the “primary” group. The secondary group contains the rules for the other small numbers (4, 6, 8, 9, 10, and 12) or special ones (25, 50, and 100). As for the unusual, well, I’ll wait on that to be a little surprise.


So let’s begin.

Primary Group

A number is divisible by

2: if it is an even number; that is, it ends with 0, 2, 4, 6, or 8.
3: if the sum of its digits is a multiple of three.

5: if the ending digit (in the units place) is 0 or 5.

7: if, after subtracting twice the units digit from the number formed by the remaining digits, you obtain a result that is easily seen to be a multiple of 7, then the original number was also divisible by 7.

[Since that rule sounds a bit confusing, we’ll take a moment to show an example. Test for 308:

The double of 8 is 16. 30 – 16 = 14. And since it’s easy to know that 14 is a multiple of 7, then we know 308 is likewise.

Proof: 308 ÷ 7 = 44

There’s more on this idea later in the unusual section.]

11: if a 0 or multiple of 11 is obtained by subtracting the sum of the digits in the “odd” places with the sum of the digits in the “even” places.

[Again, to help you, I’ll show a couple of examples.

Test for 4367 and 1848:

4367 –> (4 + 6) – (3 + 7) = 1010 = 0

1848 –> (8 + 8) – (1 + 4) = 165 = 11

Proof: 4367 ÷ 11 = 397

1848 ÷ 11 = 168]


Secondary Group

A number is divisible by

	4: if the number formed by the final pair of digits
	   is likewise divisible by 4.  Example:

		8672 --> 72 ÷ 4 = 18

		so 8672 ÷ 4 = 2198

	8: if the number formed by the final three digits
	   is likewise divisible by 8.  Example:

		73,104 --> 104 ÷ 8 = 13

		so 73,104 ÷ 8 = 9138

	9: if the sum of the digits is a multiple of 9.
	   Example: 4,617.

		4,617 --> 4 + 6 + 1 + 7 = 18

		since 18 = 9 × 2,

		then 4,617 ÷ 9 = 513

	6: if the number obeys the rules for 2 and 3; that is,
	   first it must be an even number, then has a digit
	   sum which is a multiple of 3.

       12: if the number obeys the rules for 3 and 4; that is,
	   it must have a digit sum that is a multiple of 3,
	   and its final digit pair is a multiple of 4.

[NOTE: The previous two rules combine earlier rules for smaller numbers because 6 = 2 × 3 and 2 and 3 are relatively prime; and 12 = 3 × 4 and 3 and 4 are likewise relatively prime numbers. And that merely means that their greatest common factor is 1. For more on the concept of relatively prime numbers, go here.]

We finish this section with some easy and obvious rules, so that you can get ready for the wild stuff to follow in the final section.

	10: if the digit in the units place is 0.

	25: if the number formed by the final pair of digits
	    is 25, 50, 75, or 00.

	50: if the number formed by the final pair of digits
	    is 50 or 00.

       100: if the number ends with a "00" pair.

The Unusual Stuff

Now we really begin the fun part, the part that usually is not included in most, if any, modern school math books. It actually may have begun for you above with the rule for 7; not too many books even

discuss that one either. They should, I feel, because it’s small and prime and at times useful. So, as the girl is pointing to it with her stick, let’s take another, closer look at the whole matter.

Some years ago I was reading an old and old-fashioned math book in Spanish. It had a chapter on divisibility tests that I found rather interesting because not only did it cover the easy basic numbers given above, but also such larger primes as 13, 17, and 19. Nowadays, if divisibility by 13, 17, or 19, or some larger prime were needed, we’d just probably get out our calculators and punch a few keys and be done with it. Afterall, memorizing a lot of rules for many numbers is not the best way to go about such things, knowing how easy it is to forget things or mix up the details of a given rule. But to learn about these other rules did prove interesting, nonetheless.

Upon looking at them carefully, I noted the procedure for each was very much like the rule for 7: multiply the units digit by something, then subtract that product from the number formed by the digits to the left. For example, and for fun, I’ll state the rule for 13 just as it was given in the book — in Spanish!

Un número es divisible por 13, cuando separando la primera
cifra de la derecha, multiplicándola por 9, restando este
producto de lo que queda a la izquierda y así sucesivamente,
da cero o múltiplo de 13.

Got that? You’ll understand when I show you the book’s example.

	See if 1456 is divisible by 13.

		145'6 × 9 = 54
	       - 54
	        09'1 × 9 = 9
	       - 9
		 0

	So, yes, 1456 is divisible by 13.

By now you could probably translate the Spanish as follows:

A number is divisible by 13, when separating the first digit
to the right, multiplying it by 9, subtracting that product
from what remains on the left and continuing in this manner,
[until] it gives zero or a multiple of 13.

So, a pattern was beginning to emerge, especially when I saw that the rules for 17 and 19 were pretty much the same; they just differed in the multiplier of the units digit. For 17, you need to multiply by 5, and for 19 you use 17. Otherwise there was no difference in the procedures.

I liked the rule for 17; you just multiply by five. That was not so hard. But I didn’t much care for the rule for 19; there you had to multiply by 17, a sorta larger number, at least not a single digit as the rules for 7, 13, and 17 were. However, it was the example for that rule that set me on the trail of why those numbers were selected in the first place. To explain the rule for 19, the book used 171. The form of the work was this:

	171 is divisible by 19 because

			17'1 × 17 = 17
		      - 17
			 0

Ah ha! Look at that 1 in the units place. Of course, I reasoned, 17 times 1, subtracted from 17, naturally would produce 0. Observe how numbers that might be called “1-enders” give us clues for the other rules. Try 21 (a multiple of 7), 91 (a multiple of 13) and 51 (a multiple of 17):

For 7: 21 –> 1 × 2 = 2 and 2 – 2 = 0.

For 13: 91 –> 1 × 9 = 9 and 9 – 9 = 0.

For 17: 51 –> 1 × 5 = 5 and 5 – 5 = 0.

Armed with that knowledge, I was ready to find divisibility rules for more numbers, mainly primes. Take 23 as our next case. Just look for a reasonably small multiple of it that is a “1-ender”. That would be 161 (23 × 7). So to see if a number was divisible by 23, just multiply the units digit by 16, etc. Take this number: 782.

782 –> 2 × 16 = 32      AND      78 – 32 = 46.

Do you see that 46 is 23 is a multiple of 23? Perhaps not, at least right away. You see, that’s the down side of the rules for larger and larger numbers; the final multiple check is sometimes not as obvious as it was for the smaller cases.

Then I began wondering if there wasn’t an easier way, at least in the multiplying step. Let’s return to the example above for 19. What if we ADDED 2 instead of subtracted 17. Wouldn’t that work? Here’s how it would look.

	171 is divisible by 19 because

			17'1 × 2 = 2
		      +  2
			19

Since multiplying by 2 is easier than by 17, this would make some problems easier, especially when the vertical format is being used. Note: 475.

Show that 475 is divisible by 19.

		Subtracting			Adding

		 47'5 x 17 = 85			 47'5 x 2 = 10
	       - 85			       + 10
		  ?				 57

The subtracting style causes a small problem, especially for elementary students: the second number is larger than the first. The advanced student would just say “it’s negative 38″ and go on with it. Afterall -38 is in fact a multiple of 19. However, this is not common knowledge for many students yet. The addition process is much simpler and doesn’t mess with the negative concept at all. In fact, if one doesn’t recognize that 57 is a multiple of 19 just yet, why not apply the rule one more time? Watch:

				5'7 × 2 = 14
			      + 14
			        19

And there’s your 19, all nicely in front of you!


You should be wondering now that if there is an addition way for 19 to go with the regular subtraction way. Or what about 7, 13, 17, 23, and any future number we might work with? Well, I’m happy to say that there are numbers for adding the products for each of our situations. And it’s very easy to determine what they are. And our clue comes from our work with 19. Recall that 17 was our subtracting-multiplier and 2 was our addition-multiplier. Notice: that once we find the multiple that is the “1-ender”, we obtain our subtraction-multiplier. Then the addition-multiplier comes naturally.

19 – 17 = 2

And that’s all there is to it!!! Deceptively simple.

To get the general idea, here is a chart for the numbers discussed so far.

Divisor Subt. Add’n
7 2 5
13 9 4
17 5 12
19 17 2
23 16 7

Perhaps you’d like to extend it a bit further.

One closing comment: as you are beginning to test a certain number to see if it is divisible by something and you use the addition-multiplier, but on the next step (if there is a need for one) you see that the subtraction-multiplier might be better, feel free to switch. Yes, you can change horses in the middle of the stream! Isn’t that nice?


Update April 2002

If you are interested in the divisibility test for the palindromic year 2002, try this: Here is a test for the question if a number n is divisible by 2002

The number must be even and, combine three digits of the number in order (from right to left) alternating them with + then -. If the result is 0 or a multiple of 1001, then the number 2002 divides it. E.g. is 1976756782 divisible by 2002 ? 782 – 756 + 976 – 001 = 1001. Yes, it is !

For this, and more interesting trivia about 2002, go to the World!Of Numbers. You will be well rewarded!


Update: January 24, 2003

For more information, consult Ask Dr. Math in the famous Math Forum site.