## Tuesday, October 6, 2009

### Vedic Mathematics Lesson 23: Divisibility Rules

In this lesson, we will deal with some basics of how to determine the divisibility of a given numerator by a given denominator. These are commonly referred to as divisibility rules. In some cases, we will also be able to use these rules to figure out what the remainder of such a division would be if we determine that the numerator is not divisible by the denominator without a remainder.

You can find all the previous posts about Vedic Mathematics below:

Multiplication Special Case 3
Vertically And Crosswise I
Vertically And Crosswise II
Squaring, Cubing, Etc.
Subtraction
Division By The Nikhilam Method I
Division By The Nikhilam Method II
Division By The Nikhilam Method III
Division By The Paravartya Method
Digital Roots
Straight Division I
Straight Division II
Vinculums

Many of the divisibility rules mentioned in this lesson will already be familiar to many people. They are recounted here just for the sake of completeness. But some are obscure and are not taught in schools even though they are well-known in Vedic Mathematics. We will not have the time and space to derive the divisibility rules using Vedic Mathematics techniques in this lesson, but we will cover that in subsequent lessons. In this lesson, we will simply recount some of the rules and how they are applied.

Divisibility rule for 2

All even numbers are divisible by 2. Thus, any number ending in 0, 2, 4, 6 or 8 is divisible by 2. Another way to express this is that if the last digit is divisible by 2, then the number itself is divisible by 2.

If the number is divisible by 2, the remainder of division by 2 is 0. If it is not divisible by 2, the remainder will be 1.

Thus, 12, 4398750, 473874, 93876, and 43758 are all divisible by 2. 329, 9877, 633, 93721, and 76235 are all not divisible by 2, and they all produce a remainder of 1 when divided by 2.

Divisibility rule for 3

If the digital root of the number is divisible by 3, then the number is divisible by 3. We have dealt with how to find the digital root of a number in this earlier lesson. Testing for divisibility is an important application of digital roots.

The remainder obtained by dividing the digital root of the number by 3 is the same as the remainder that would be obtained by dividing the original number by 3.

699, 3204, 398475, and 326649 are all divisible by 3. 38782, 677584 and 759391 produce a remainder of 1 when divided by 3. 837038, 984335, and 33263 produce a remainder of 2 when divided by 3.

Divisibility rule for 4

There are two rules that can be used to determine divisibility of a number by 4. Both the rules use just the last two digits of the number.

The first rule is that if the last two digits of the number are divisible by 4, the original number is divisible by 4. This rule is easy to check against when the last two digits are small and their divisibility by 4 is easy to verify.

The second rule is that if the sum of the last digit and twice the next-to-last digit is divisible by 4, then the original number is divisible by 4. This rule is easier to check against when the last two digits are large and checking for their direct divisibility by 4 becomes more difficult.

439812, 4332, 858804, etc. are easy to verify as being divisible by 4 using the first rule. 876592, 437656 and 345784 produce 2 + 9x2 = 20, 6 + 5x2 = 16, and 4 + 8x2 = 20 as the answer when the second rule is applied. Thus these numbers are also divisible by 4.

The remainder obtained by dividing the last two digits of the number by 4 is the same as the remainder that would be obtained by dividing the original number by 4.

Similarly, the remainder obtained by dividing the sum of the last number and twice the next-to-last number by 4 is the same as the remainder that would be obtained by dividing the original number by 4.

33875, 49985 and 9222 produce remainders of 3, 1 and 2 respectively when divided by 4.

Divisibility rule for 5

Any number that ends in 0 or 5 is divisible by 5. The remainder from dividing a number by 5 is the same as the remainder one would obtain by dividing the last digit by 5.

This is just the last digit itself, or the last digit - 5 in cases where the last digit is greater than 5.

Thus, 987390, 27685, 38740, etc. are all divisible by 5. 32768, 45874, 34981 and 38437 produce remainders of 3, 4, 1 and 2 respectively when divided by 5.

Divisibility rule for 6

6 is the product of 2 co-prime factors, 2 and 3, that each have their own divisibility rules. The rule for division by 6 is therefore a combination of the divisibility rules of these two factors: if a number is divisible by both 2 and 3, then it is divisible by 6.

Thus, 32874, 46944, 945834, etc., are all divisible by 6.

The remainder of division of a number by 6 is a function of the remainder of division of that number by both 2 and 3. The table below shows how the remainder of division by 6 can be computed when the remainders after division by 2 and 3 are known:

Remainder after . . . Remainder after . . . . . Remainder after
Division by 2 . . . . Division by 3 . . . . . . Division by 6
0 . . . . . . . . . . 0 . . . . . . . . . . . . 0
0 . . . . . . . . . . 1 . . . . . . . . . . . . 4
0 . . . . . . . . . . 2 . . . . . . . . . . . . 2
1 . . . . . . . . . . 0 . . . . . . . . . . . . 3
1 . . . . . . . . . . 1 . . . . . . . . . . . . 1
1 . . . . . . . . . . 2 . . . . . . . . . . . . 5

Note that the first line of the table above is divisibility rule itself: if the remainders are zero after division by 2 and 3, then the number is divisible by 6 with a remainder of 0.

Divisibility rule for 7

The rules for divisibility by 7 are not well-known to most people. But there are actually not just one, but two simple rules for determining divisibility by 7.

Rule 1: Take twice the last digit of the number and subtract it from the number that is left after removal of the last digit. If the result is divisible by 7, then the original number is divisible by 7. This same rule can be applied repeatedly to check the divisibility of intermediate results by 7 until one obtains a final result for which the divisibility by 7 can be verified on sight.

Take the number 163198 for instance. When we apply the rule above, we get 16319 - 8x2 = 16303 as the first result. It is difficult to tell whether this is divisible by 7. So, we continue by applying the rule on this intermediate result. Our next intermediate result becomes 1630 - 3x2 = 1624. We apply the rule once more to get 162 - 4x2 = 154.

And finally, we get 15 - 4x2 = 7. This is clearly divisible by 7, so we can say with confidence that 163198, our original number, is divisible by 7.

Note that sometimes, this method can produce a negative result instead of a positive result (for instance, in the case of 35, we get 3 - 5x2 = -7). But the rule is still applicable, and in the case of our example in parentheses, we can say that 35 is divisible by 7 because -7 is divisible by 7 (albeit with a negative quotient).

Also note that because of the way the rule is formulated, all zeroes at the end of a number can be ignored safely when determining divisibility by 7.

Rule 2: Take 5 times the last digit and add it to the number that is left after removal of the last digit. If the result is divisible by 7, then the original number is divisible by 7.

This same rule can be applied repeatedly to check the divisibility of the intermediate results by 7 until one obtains a final result for which one can verify the divisibility by 7 on sight.

Take the number 163198 again. When we apply this rule, we get 16319 + 8x5 = 16359. Apply the rule once more to get 1635 + 5x9 = 1680. Applying the rule once again gives us 168. One more application gives us 16 + 8x5 = 56. We know that 56 is divisible by 7 on sight, but just to verify, we can simplify it further to 35, 28, 42, 14, 21, and 7.

Obviously, the last result above is undoubtedly divisible by 7, so we know that 163198 is divisible by 7.

This rule may appear simpler to apply than rule 1, but it does have one significant disadvantage: you can not determine the remainder after division by 7 using this method because the final results do not correspond to the remainders in any obvious way.

Divisibility rule for 8

Just like for 4, there are two rules for testing divisibility by 8. If one has astutely paid attention to the divisibility rules for the powers of 2 thus far (2 and 4), one can guess that both the rules for divisibility by 8 involve just the last 3 digits of the number.

The first rule, just like in the case of 4, is that if the last 3 digits are divisible by 8, then the number itself is divisible by 8. As in the case of 4, this rule can be difficult to apply when the last 3 digits are large.

The second rule is similar to that used for 4 also. We take the sum of three numbers: the first number is the last digit itself. The second number is twice the next-to-last digit. The third number is 4 times the digit 3rd from the end. As you can see, the pattern is very obvious, and I am sure anyone can guess what the divisibility rules for 16 are going to be!

Applying the second rule to 395768 for instance, we calculate 8 + 2x6 + 4x7 = 48. Since 48 is divisible is divisible by 8 (we can verify that by repeatedly applying this rule on all intermediate results until we get a single-digit number, 8 in this case), we conclude that 395768 is divisible by 8 too.

The remainder of division by 8 is the same as the remainder of division of the last 3 digits by 8. It is also the same as the remainder of dividing the sum, as calculated in the second rule, by 8.

Divisibility rule for 9

The rule for division by 9 is similar to the rule for division by 3: If the digital root of the number is divisible by 9, then the number itself is divisible by 9. The rule for calculating the remainder is even simpler: if the digital root is not 9, then the remainder of division by 9 is just the digital root itself!

Thus, 732987, 859878, 356679, etc. are all divisible by 9. 3987982, 937483, 2934636, etc. produce 1, 7, and 6 as remainders when divided by 9.

Divisibility rule for 10

10 is a composite number that has two co-prime factors, 2 and 5. Thus, just like for 6, if the number is divisible by both 2 and 5, it is divisible by 10. Since the divisibility rules for both 2 and 5 depend solely on the last digit of the number, a quick comparison of the two rules leads to a very simple rule for 10: If the last digit is is a 0, then the number is divisible by 10. The remainder after division by 10 (if the number does not end in 0) is the last digit itself.

Divisibility rule for 11

There are actually two rules to test divisibility by 11. The first rule is somewhat well-known and is therefore presented first. The second rule is much more obscure.

Rule 1: To test divisibility by 11, number the digits alternately (starting from either end) as zero digits or 1 digits. Take the sum of the zero digits separately and call it the zero-sum. Take the sum of the 1 digits and call it the 1-sum. If the difference between the 1-sum and the zero-sum is divisible by 11, then the original number is divisible by 11.

Take the number 549873489 for instance. We number the digits as zero-digits or 1-digits starting from the left, as below:

010101010
549873489

Adding up the zero-digits gives us 5 + 9 + 7 + 4 + 9 = 34.
Adding up the 1-digits gives us 4 + 8 + 3 + 8 = 23.

The difference between them is 34 - 23 = 11. Since 11 is obviously divisible by 11, we can conclude that 549873489 is also divisible by 11.

The remainder after dividing the difference between the two sums by 11 is the same as the remainder after dividing the original number by 11. Thus, for instance, 9475909 has a zero-sum of 9 + 7 + 9 + 9 = 34 (assuming the numbering starts with 0 at the left-most digit), and a 1-sum of 4 + 5 + 0 = 9. The difference between them is 25, and the remainder of dividing 25 by 11 is 3. Thus, we can conclude that the remainder of dividing 9475909 by 11 is also 3.

Rule 2: Subtract the last digit from the number left over after removal of the last digit. If this result is divisible by 11, then the original number is divisible by 11.

Take 549873489, once again. The first application of this rule results in the number 54987348 - 9 = 54987339. We apply the rule once again and get 5498733 - 9 = 5498724. Applying the rule repeatedly gives us the results 549868, 54978, 5489, 539, 44, 0. Since it is easy to recognize that 44 and 0 are both divisible by 11, we can conclude that the original number is divisible by 11 too.

Divisibility rule for 12

12 is the product of co-prime factors 4 and 3. Thus the divisibility rule for 12 is that if it is divisible by 4 and 3, it is divisible by 12. Note that even though 6 and 2 are also factors of 12, they are not co-prime, so one can not test for divisibility by 6 and 2 and conclude anything about the divisibility of the number by 12. One can easily derive a table, just like for divisibility by 6, to determine the remainder after division by 12 given the remainders after division by 4 and 3.

Divisibility rule for 13

The rule for division by 13, once again, is obscure enough that most people do not know about it. There are two rules to check for divisibility by 13, similar to those for division by 7 (for a reason we will explore in a future lesson).

Rule 1: Take 9 times the last digit and subtract it from the number left after removal of the last digit. If the result is divisible by 13, then the original number is also divisible by 13.

Take the number 9847591, for instance. Applying this rule the first time give us a result of 984759 - 9x1 = 984750. The next application of this rule results in 98475 - 9x0 = 98475. Subsequent applications get us 9802, 962, 78, -65. One can recognize that both 78 and -65 are multiples of 13, so we can conclude that 9847591 is divisible by 13. Once we get a negative result by the application of this rule, add 13 successively to the result until the result becomes non-negative. If the result becomes zero at some point during this successive addition of the divisor, then we can conclude that the divisibility rule is satisfied.

Rule 2: The rule is to take 4 times the last digit and add it to the number left after removal of the last digit. If this sum is divisible by 13, the original number is also divisible by 13.

Take 9847591, once again. Applying this rule, we first get 984759 + 1x4 = 984763. Applying the rule once more, we get 98476 + 3x4 = 98488. Continued application of the rule results in successive results of 9880, 988, 130, and 13. 13 is obviously divisible by 13, so we can conclude that 9847591 is divisible by 13.

Divisibility rule for 14

It is trivial, by now, for one to figure out that since 14 is the product of co-prime factors 7 and 2, divisibility by 14 requires divisibility by both 7 and 2.

Divisibility rule for 15

Similarly, 15 has co-prime factors 3 and 5, thus divisibility by 15 requires divisibility by both 3 and 5.

Divisibility rule for 16

This is simply an extension of the pattern we have already seen for divisibility rules that test for divisibility by 2, 4 and 8. Thus, a number is divisible by 16 if the last 4 digits of the number are divisible by 16. Alternatively, where this test is too difficult to apply directly, one can also take the sum of the first digit, twice the second digit, 4 times the 3rd digit and 8 times the 4th digits (digits are numbered from the right, not the left), and test this sum for divisibility by 16.

That second rule is completely wrong, and fails even when checking divisibility of 16 by 16. I have no idea whether anybody used this to come to wrong conclusions. I hope not. After a lot of thought and experimentation, I have come up with divisibility rules for powers of 2 such as 16 and 32 in this later post.

Divisibility rule for 17

There are, once again, two rules that can be used to check for divisibility by 17. Both the rules for division by 17 are similar to the rules for division by 7 and 13. They are very obscure and mostly unknown, but easy enough to apply.

Rule 1: Subtract 5 times the last digit from the number left over after removal of the last digit. If the result is divisible by 17, the original number is divisible by 17.

Take 221 for instance. We can see that the application of this rule produces 22 - 1x5 = 17, which is divisible by 17. So, we can conclude that 221 is divisible by 17. Just as in checking division by 7 and 13, if you get a negative result, add 17 to it until you get a non-negative number. If that number is 0, then the divisibility rule is satisfied.

Rule 2: Simply add 12 times the last digit to the number left over after removing the last digit. If the sum is divisible by 17, then the number is divisible by 17.

Take 221 once again. The first application of the rule gives us 22 + 1x12 = 34. This is obviously divisible by 17, so one can conclude that 221 is divisible by 17. One can also continue the process, getting 51 and 17 as further results. Since nobody could doubt that 17 is divisible by 17, we can conclude that 221 is indeed divisible by 17!

Divisibility rule for 18

18 is a product of the co-prime factors 9 and 2. Thus divisibility by 9 requires divisibility by both 9 and 2.

Divisibility rule for 19

Similar to the rules for divisibility by 7, 13 and 17, we have two obscure, but simple rules for checking divisibility by 19.

Rule 1: Subtract 17 times the last digit from the number left after removing the last digit. If the result is divisible by 19, the original number is too. Because of the obvious difficulties involved in multiplying by a large number such as 17, we will ignore this rule for now, and move on to the next rule.

Rule 2: Another rule for divisibility by 19, that is much easier to apply, is to take twice the last digit and add it to the number left over after removing the last digit (very similar to the rules for 7, 13 and 17). If the sum is divisible by 19, the original number is too.

Take 187606 for instance. Applying the rule first gives us 18760 + 6x2 = 18772. Repeated applications of the rule gives us 1881, 190 and 19. Since 19 is obviously divisible by 19, we can conclude that 187606 is divisible by 19.

Divisibility rule for 20

Given that 20 is the product of co-prime factors 4 and 5, it is trivial to derive the divisibility rule for 20.

Hope this lesson has given you some insight into how to determine the divisibility of any number by numbers upto and including 20. It is easy to derive divisibility rules for many composite numbers beyond 20 by checking to see if they are the product of co-prime factors for which the divisibility rule is known.

For many primes numbers above 20, divisibility rules are not well-known, but Vedic Mathematics does provide a simple method to derive divisibility rules for them. We will learn more about divisibility rules, and how to derive them using this Vedic Mathematics technique, in the upcoming lessons. Good luck, and happy computing!

Anonymous said...

Please keep it up and thanks!

Anonymous said...

hi I have a question.divisibility test for 7 where you have table to get remainder.How does that works.Can you give us an example.I tried 163197 where remainder should be 6 but what I am getting is -3 which if i add with 7 I get final answer as 4 and for 4 the remainder in table is 5.
I tried 342 which is 3 only and it does not mach with the remainder.

Really thanks for the post.It is very useful

Blogannath said...

You are absolutely right. The remainders are related to the results obtained from applying the rule only when the rule is applied just once (in that case, for instance, result of 1 means remainder of 3, result of 5 means remainder of 1, and so on). Once you apply the rule multiple times, the relationship does not hold anymore. I have removed the table from my post above because of this complication. Thanks for pointing out the error.

The same is true about the divisibility rules for 13, 17 and 19. So, I have removed references to the derivability of a table relating results of the application of the rule and the remainders from division by those numbers.

rekha shyam said...

hi gr8 tutorial..u have taken Maths to a different level...enjoying ur blog..only problem i face is that it takes a while to view ur page..is it because of the ads????

Blogannath said...

Thank you for visiting and leaving a comment. I am glad you like the content.

The speed of page-loading is dependent on a number of factors including the browser, the connection speed, etc. I am constantly tweaking the layout of the pages, so hopefully, the problem will go away over time.

Anonymous said...

HI blogannath.....
As i was reading your post, i noticed a two patterns for determining divisibility.... for non prime numbers i have to use the co prime method..... but for prime number you are using methods of adding or subtracting the last digit.....and the number would add up to the respective prime number.... for e.g the rules for 7 are with twice and 5 times... which is 2+5 = 7..... similarly 13= 9+4.... so i wanted to know is there a standard method as well for reaching these methods... or is it a hit and trial....
Regards,
Ankit

Blogannath said...

As mentioned in the last paragraph, later lessons in the Vedic Math series do provide details on how to derive divisibility rules for prime numbers. There is nothing hit and trial about any part of mathematics, including divisibility rules.

Anonymous said...

How to check divisibility by 7 for 21...... it gives 0 after substraction

Blogannath said...

I don't see what the problem is: 0 is divisible by every number (including 7). 0 divided by any number is 0 with no remainder.

Anonymous said...

I was practicing some problems from sarvesh Verm's quantitative aptitude and was highly tensed for not being able to understand using osculators. but u have taken my understanding to a different level. thanx a lot.

Anonymous said...

Excellent reference material for shortcuts on mathematical solution.

Anonymous said...

why there's no 21 and above ??
even just #23 ..

Unknown said...

Are there any other ways to find divisibility of 7 !!!! Cause I feel that it's very long

Thilak Reddy said...

Are there any other ways to find divisibility of 7 !!!! Cause I feel that it's very long

Sravani Tungala said...

Is there any explanation for why to multiply with 2 to check the divisibility with 7 and 9 or 4 to check divisibility of 13 and 5 or 12 incase of 17 ...i can see that 9+4=13 bt y only 9 or 4 why not 11 or 2???? Hope u understand my doubt!!!!

Blogannath said...

Please take a look at the next lesson for a full explanation of how the divisibility rules for numbers like 7, 13, etc. work. http://blogannath.blogspot.com/2009/10/vedic-mathematics-lesson-24-simple.html

## Content From TheFreeDictionary.com

In the News

Article of the Day

This Day in History

Today's Birthday

Quote of the Day

Word of the Day

Match Up
 Match each word in the left column with its synonym on the right. When finished, click Answer to see the results. Good luck!

Hangman

Spelling Bee
difficulty level:
score: -