Divisibility by 7
Divisibility by 7: Now we will study divisibility by 7. One book on speed arithmetic says that these tests are just too complicated, and you should just divide by 7. I agree to some extent, but my calculator still will not let me enter really large numbers. One interesting way (found in some books) is to take the two left-most digits, multiply the left digit by 3 and add it to the second digit. Replace these two digits with the result. Then we can keep repeating, always dealing with only the two left-most digits, until we end up with a small number which is either divisible by 7 or not. Pretend we have a two digit number, 10x+y. We multiply the left digit by 3 and add the second digit: 3x+y. All we did was just subtract 7x. If 3x+y is divisible by 7, then so is 10x+y. This works at the left end of a long number, too. The two left-most digits are 10x+y times some power of 10. Multiplying the left digit by 3 and adding the second digit gives us 3x+y times the same power of 10. And we subtracted off 7 times the same power of 10. Again, divisibility by 7 was not altered.
4712954379 1912954379 1212954379 512954379 162954379 92954379 29954379 15954379 8954379 3354379 1254379 554379 204379 64379 22379 8379 2779 1379 679 259 119 49
49 is divisible by 7. We could have stopped the process once we got a number that was small enough for my calculator, and divided the current number by 7. Since 49 is divisible by 7, every number above it is also divisible by 7. Modular arithmetic gives us the following method. Start at the right digit, and go left. 1st digit + 3 times the 2nd digit + 2 times the 3rd digit - the 4th digit - 3 times the 5th digit 2 times the 6th digit. And then we repeat the sequence, + the 7th digit + 3 times the 8th digit, etc. If the whole "sum" is divisible by 7, then the original number is divisible by 7.
4712954379 9+3(7)+2(3)-4-3(5)-2(9)+2+3(1)+2(7)-4=14 14 is divisible by 7. You can see that this is a much faster method. With really huge numbers,