quora.com
How can I check if a number is divisible by 7 when the number has 1,000 or more digits?
David Wallace's answer: I came up with a method I call the “231 method,” which I’m sure others must have come up with previously. It’s based on the fact that 1000=-1, 100=2, 10=3, and 1=1 (mod 7). Thi...