3 ms·
10 = 3 (mod 7) So this works because you're substituting the powers of 10 with powers of 3, and we're operating under mod 7 arithmetic. Conveniently, this can
by Jtsummers 11y ago
10 = 3 (mod 7)
So this works because you're substituting the powers of 10 with powers of 3, and we're operating under mod 7 arithmetic. Conveniently, this can also be repeated like drfuchs' method if your numbers are too large to recognize as a multiple of 7 after the first pass.
413 => 4*9+1*3+3 = 42 => 4*3+2 = 14 => 1*3+4=7