Theorem
Divisibility by or from the last digits
Arithmetic • Number System • Divisibility
Statement
Since , every part of a number above its last digits is a multiple of and of . So is divisible by (or by ) exactly when the number formed by its last digits is. In particular, exactly when the last two digits are , , or , and exactly when the last two digits form a multiple of .
How to use it
- 1Pick from the divisor: and need the last two digits, and need the last three.
- 2When some digits are unknown, list the few endings that work; this usually fixes the unknown digits to two or three cases.
- 3For a divisor such as , or , split it into coprime factors and apply this test to the power of or only.
Worked example
The number is divisible by , where is a digit. Which values can take?
Step-by-step
- 1, so test the last three digits
Why: Everything above the last three digits is a multiple of , and is a multiple of .
- 2; , so we need
Why: Write the ending with the unknown digit separated out.
- 3, so or
Why: Reduce to modulo , then keep only digits from to .
Answer
or (endings and )
Watch out
The test works only for powers of and , because only these divide a power of . For , or the whole number matters and a digit-sum test is needed. Do not use two digits for : ends in but is not divisible by .
Builds on
Also known as
divisibility by 25, divisibility by 4, divisibility by 8, divisibility by 125, last two digits test, last three digits test, ends in 00 25 50 75