Tests of divisibility

There are some quick ways to test for whether a number is divisible by another number. To check if a number is divisible by n try these tests:

na number is divisible by n if
2If the last digit is even
5If the last digit 0 or 5
4it ends e0, e4, e8, o2, o6 (e=even digit, o=odd digit)
or, if the last digit plus twice the second-to-last digit is divisible by 4
3If the sum of all of the digits is divisible by 3
6If the sum of all of the digits is divisible by 3 and the number is even
8the last digit + 2 x the second-to-last digit + 4 x the third-to-last digit is divisible by 8
9If the sum of all of the digits is divisible by 9
11Make two sums of the alternate digits. For example, for the number 2453 the sums are 2+5=7 and 4+3=7. If the difference between the two sums is divisible by 11.

Unfortunately, there is no easy test for 7.

How do the tests work?