ANSWERS: 1

The answer is below, quoted directly from Mr. Loy's webpage. It's pretty complex, but here's the answer. === Divisibility Tests © Copyright 1999, Jim Loy 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 leftmost 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 leftmost 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 leftmost 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)43(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, you might need to repeat the above steps. I use a different method. I separate the huge number into 6digit numbers (4712 954379), add them together (4712+954379=959091). I use my calculator to divide this by 7, and there is no remainder (959091/7=137013 with no remainder), so the original number is divisible by 7. With really huge numbers, I may have to repeat these steps. This method works for divisibility by 13, by the way. The above number is not divisible by 13. Why do we separate the number into 6digit numbers? Well again, modular arithmetic produces that information. For divisibility by 37, we separate the long number into 3digit numbers.  Addendum: I received email from Jordan Baker, describing another test for divisibility by 7: "Take the last digit off, double it, and subtract it from the rest of the numbers. If the result is divisible by 7, so was the original number." And that can be repeated, of course. He gave this example: "Take a number like 408254, which is divisible by 7. Take the 4 off the end, and double it: 8. 40825  8=40817." Then he repeated the process. Here is my explanation of why this works: A many digit number is 10x+y (for example, 3176 is 317(10)+6). 10x+y is divisible by 7 if and only if 20x+2y is divisible by 7 (that is twice the original number, doubling it does not affect its divisibility by 7, as 2 and 7 are relatively prime). We can subtract 21x from 20x+2y without affecting its divisibility by 7 (21x is divisible by 7). That gives 2yx (which is usually a negative number, by the way). So, 10x+1 is divisible by 7 if and only if 2yx is divisible by 7. The method that Mr. Baker showed me was x2y, which is (2yx). So 10x+1 is divisible by 7 if and only if x2y is divisible by 7. I thought that I had seen that method before. Here is actually what I had seen before, from The Dictionary of Curious and Interesting Numbers, by David Wells: Multiply the rightmost digit by 5 and add to the rest of the numbers. If this sum is divisible by 7, then the original number is divisible by 7. And that too can be repeated. This is a slow method. It is roughly as fast as the above methods (3x+y and x2y) until near the end, and then it can take 5 or 6 extra steps. Also, if you end up with 49, you get no further, as the next number is also 49. Otherwise, you can keep repeating the process until you get a one digit number (7). Why does it work? Our original number is 10x+y. We can multiply that by 5 without affecting its divisibility by 7: 50x+5y. We can subtract off 49x (which is divisible by 7) without affecting its divisibility by 7: x+5y. And x+5y is the method described. SOURCE: http://www.jimloy.com/number/divis.htm
Copyright 2018, Wired Ivy, LLC