# MSC #16 – Divisibility: Extending the Divisibility Rule for 9

The divisibility rule for 9 can be extended for divisors composed entirely of 9s like 99, 999, 9999 etc.

The rule for 9 is that “If the sum of the digits of the number is divisible by 9, then the number is divisible by 9”. We can avoid division by the repeating the addition if the sum of the digits has more than 1 digit. For example, for the number 4851, the sum of the digits is 18, so we add 1 and 8 and get 9. Thus the number is exactly divisible by 9.

Now if we add 2 to 4851, we get 4853. This number obviously would have a remainder of 2 when divided by 9. Let us see what the digit sum of 4853 is. Adding the digits will give us a total of 20 and 2 + 0 = 2. We can see here that the digit sum is the remainder when a number is divided by 9.

“Casting out 9s” is a technique to quickly find the digit sum of a number. We can cast out or delete a 9, or digits totaling 9 or a multiple of 9. For 4851, we can cast out 4+5 and 8 +1, leaving zero.

In our example, to find out if 2,355,642 is divisible by 999, we partition the number into groups of 3 digits each starting from the right. Then we will find the sum of these groups of 3: 642 + 355 + 2 = 999. Then the number is divisible by 999.

How about 995,798, 897? If we solve 897 + 798 + 995 = 2690. The we add again 690 + 2, to get 692. We can say that 995,798,897 will have a remainder of 692 when divided by 999.

See how we can develop divisibility rules for numbers like 299, 5001, etc. in Chapter 16 of our soon to be released book, “30 Master Techniques in Computing”