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:
| n | a number is divisible by n if |
| 2 | If the last digit is even |
| 5 | If the last digit 0 or 5 |
| 4 | it 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 |
| 3 | If the sum of all of the digits is divisible by 3 |
| 6 | If the sum of all of the digits is divisible by 3 and the number is even |
| 8 | the last digit + 2 x the second-to-last digit + 4 x the third-to-last digit is divisible by 8 |
| 9 | If the sum of all of the digits is divisible by 9 |
| 11 | Make 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.
