News for hackers. Stuff that matters.
Re:Divisibility by 7 by aufreak3 on Sunday October 31, 2010 @07:07AM (#1853061)
(warning: funny one)

Express the number in base 7. If the last digit is 0, then the number is divisible by 7. I win!

Re:Divisibility by 7 by aufreak3 on Sunday October 31, 2010 @07:16AM (#1853069)
More seriously, if you consider that the series 10^0, 10^1, 10^2, 10^3, etc. in modulo 7 runs as 1, 3, 2, -1, -3, -2, (loop with period 6), the remainder upon dividing a decimal number FEDCBA by 7 = the remainder on dividing (A-D) + 3(B-E) + 2(C-F) by 7.

Ex: 23456 mod 7 = 3+9+8 mod 7 = 6