The wikipedia page for divisibility rule for 7 has an interesting method. Which I am elaborating and generalizing.
- let a number N. Make pairs of the number starting from right.
- find remainders for each pair. let remainders be R0,R1,R2,R3.. .
- Then the number N is divisible by 7 if R0X2^0 + R1X2^1+R2X2^2+R3X2^3... is divisible by 7.
- eg
- 194,536: 19|45|36 ; (5x4) + (3x2) + (1x1) = 27, so it is not divisible by 7
- 204,540: 20|45|40 ; (6x4) + (3x2) + (5x1) = 35, so it is divisible by 7
- 1,655,598: 1|65|55|98 ; (1x8) + (2x4) + (6x2) + (0*1) = 28, so it is divisible by 7
- can this be proved?
- the system may give easier results if we take negative remainders(in case remainders are 5,6 we can take remainder as -2,-1)