Powered By Blogger

Friday, 21 June 2013

Divisibility tests for all prime numbers upto 100-prime 31

I had dealt with prime 23 in my previous blog.
I now deal with another prime 31,where there is a small difference in the procedure.
Here I choose the number P as 992 which has 31 as a factor.This is of the form (1000m-n) instead of the form (1000m+n) as in the case of prime 23 and hence the need for the change in procedure
No to be tested is the same viz 26105069.(This number was specifically chosen as it is a multiple of 31).
Step 1-We have  the same groups of 3 nos-A 069,B 105 and C 26.
We also now have m=1 and n=8
Step 2 Division by 'm' and multiplication by 'n' of C-
26/1=26.....26*8=208
Step 3-The change in procedure occurs here.We now have to add this result to B instead of deducting as in the case of prime 23.
105+208=313.
Step 4 Process repeated   viz 313/1=313....313*8=2504
Step 5 Result is added to A  viz 069+2504=2573
Step 6-The result in step 5 is the final result to be tested for divisibility by 31.
As 2573 is divisible by 31....(2573=31*83) we conclude the number under test 26105069 is divisible by 31.Actually the quotient is 842099.
In all cases where P is of the form (1000m-n) the change in procedure in step 3 viz addition as done above is to be followed.

No comments:

Post a Comment