Divisibility rules for 2 and 4
Overview
Divisibility by 2
A number is divisible by iff its last digit is even (0, 2, 4, 6, 8).
Divisibility by 4
A number is divisible by iff the number formed by its last two digits is divisible by .
Why the “last few digits” rules work:
Write a positive integer in base 10:
Since , we have . So exactly when (the factor appears in ). So modulo :
- is not divisible by (only gives ).
- are not both divisible by ; are divisible by .
- are divisible by ; only the last three digits matter.
- are divisible by ; only the last four digits matter.
So:
| Divisor | Depends only on last … digits |
|---|---|
| 1 (last digit) | |
| 2 | |
| 3 | |
| 4 |
Examples
- is divisible by (last digit ).
- is divisible by (last two digits ).
- is divisible by (last three digits ).
- is divisible by (last four digits ).