The whole process can be explained by writing
A^x/B = C
where C can be +1 or -1 or 0. Here C is the remainder got on division of A^x by B.
Now we operate on base 10. So A takes a value of 10. B is the divisor for which you are attempting to set up a rule for. This method is called compartmentalisation. It is used
to check on divisibility / remainder for numbers as you had stated .. not for the normal smal numbers. There are much effective rules for the same.
Suppose you talk of divisibility by 9:
Consider any 2 digit number AB. This can be represented in terms of der place values as
AB = 10A+B = 9A+A+B.
Now if you were to check divisibility by 9.
[9A + (A+B)]/9. Then the first term 9A is divisible. Now if the whole number is to be divisible, we would want the terms (A+B) to also be divisible. So the divisibility of the
number depends on (A+B) which is nothing but the digit sum. Which is why you see that the
divisibility rule for 9 is "The digit sum of the number must be divisible by 9"
Also you got to note that:
10^x/9 = +1 for whatever be the value of x. This results in another rule:
10^x/3 = +1 which is the rule for divisibility by 3.
Now consider the RULE FOR 7
Here A=10 (base 10), B = 7. Now we have to choose values for x such that
it gives a remainder of C= +1 or -1.
we see the following pattern:
10^0/7 = +1
10^3/7 = -1
10^6/7 = +1
So we see that +1 and -1 remainders alternate every three powers of ten. This gives our compartmentalisation rule. The given number from left to right has to be grouped in threes
and the rule of +1 and -1 for every triplet has to be applied. You will see it :
ABCPQRXYZ be a number. To check the divisibility by 7, we write it as:
[10^6 ABC]/7 + [10^3 PQR]/7 + [10^0 XYZ]/7
Now 10^6/7=+1 , 10^3/7 = -1 and so on..
This reduces to
(1xABC) (-1XPQR) (1*XYZ)
RULE : Sum of triplets at odd places - sum of triplets at even places
eg: 100200140240 /7 . What would be the remainder?
100 | 200 | 140 | 240 |
-1 | +1 | -1 | +1
200 + 240 = 440
You get 440-240 = 200
200/7 gives a R= 4
Now consider the RULE FOR 11
10^0 / 11 = +1
10^1/ 11 = -1
10^2/ 11 = +1
10^3/11 = - 1
FOr 11, you can do it in 2 ways. One is that you notice that every alternate power of 10 divided by 11 gives an alternating pattern of +1 and -1. So the compartmentalisation will
now be for every digit. So you do a
Sum of digits at odd places - Sum of digits at even places.
But if you did notice the fact that 10^0/11 = +1 and 10^3/11 = -1
Then you will notice that 11, same as 7, has +1 and -1 alternating for triplets.
So, you can proceed compartmentalising the number into triplets and doing the same thing
as we did for 7.
Sum of triplets at odd places - Sum of triplets at even places.
So we see that so far :
1. 10^x / B = +1 will hold good for three cases i guess (not sure it may be more ... )
They are 3, 9 , 37.
Even 10^3/37 = +1 . So here there are no alternate +1 and -1 as 10^6/37 will also be
+1. Note that (a^m)^n = a^mn
**Rule for 37 would be : Group the number into triplets and apply a +1 to each triplet.
10^x / B = +1 or -1 will hold good for 7, 11, 17
Rule for 17 (thus) : 10^8/17 = -1. So, 10^16/17 would be +1. So it becomes like
(Sum of digits at odd places taken 8 at a time - sum of digits at even places taken 8 at a time. )**
3. Also 10^x/B = 0 (gives a remainder of 0 )when B are powers of 2 or powers of 5.
I still dont know if it is possibile to cover all primes (atleast 2 digits) in this method.
Perhaps you may have to use other techniques like Chinese Remainder Theorem or the Basic Remainder Theorem and so on.. That is because I still dont see any patterns for 23 and many more numbers. If anybody could add anything more to this .. it would be great.
Hope this post helps.