I have devised another general method for testing divisibility of any number by all the primes below 100.
I will cover cases of each prime one after another.The method is based on a procedure similar to that for 17,19 and 59 shown in my earlier blogs.
In each case a suitable number -call it P- for which the prime considered is a factor should first be selected of the form (1000m+n) or(1000m-n)
Let be show the procedure for the next prime after 19 viz 23
The number P chosen for 23 is 2001 which has 23 as a factor.In this case m=2 and n=1
Let us consider the number 26105069 for test.
Step 1-This is broken up into groups of 3 digits starting from right calling them A,B and C.
We thus have A=069,B=105, and C=26.
Step2-We divide C by m and then multiply by n
We get 26/2=13 and 13*1=13
Step3-The result is subtracted from B .We get 105-13=92
Step4-Process in Step 2 is now repeated with the result in previous step.
We get 92/2=46 and 46*1=46
Step5-The result is subtracted from A.We get 069-46=23
Step6-The final result is tested for divisibility by 23.If it is divisible, the number under test can be considered as divisible
In our case the final result is itself 23-divisible obviously by 23 and hence the number under test viz 26105069 is so divisible
The values of P ,m and n vary for each prime otherwise the process is more or less similar.
I will cover cases of each prime one after another.The method is based on a procedure similar to that for 17,19 and 59 shown in my earlier blogs.
In each case a suitable number -call it P- for which the prime considered is a factor should first be selected of the form (1000m+n) or(1000m-n)
Let be show the procedure for the next prime after 19 viz 23
The number P chosen for 23 is 2001 which has 23 as a factor.In this case m=2 and n=1
Let us consider the number 26105069 for test.
Step 1-This is broken up into groups of 3 digits starting from right calling them A,B and C.
We thus have A=069,B=105, and C=26.
Step2-We divide C by m and then multiply by n
We get 26/2=13 and 13*1=13
Step3-The result is subtracted from B .We get 105-13=92
Step4-Process in Step 2 is now repeated with the result in previous step.
We get 92/2=46 and 46*1=46
Step5-The result is subtracted from A.We get 069-46=23
Step6-The final result is tested for divisibility by 23.If it is divisible, the number under test can be considered as divisible
In our case the final result is itself 23-divisible obviously by 23 and hence the number under test viz 26105069 is so divisible
The values of P ,m and n vary for each prime otherwise the process is more or less similar.
No comments:
Post a Comment