What are the possible remainders when the 100-th power of an
integer is divided by 125? This is a solution from Yatir Halevi,
Maccabim-Reut High School, Israel.
Every integer can be expressed in the following way: 5p+q, where
p and q are certain integers and 0 £ q £ 4. Expanding
(5p + q)100 with the aid of the binomial theorem we get the general
term:
ak =
æ ç
è
100 k
ö ÷
ø
5100-kp100-kqk.
All the terms except the last one q100 are divisible by 125.
What we get is a number of this sort: 125×something+ q100. But we know that 0 £ q £ 4 so the remainder when
the 100th power is divided by 125 is the same as the remainder for
q100, with q = 0, 1, 2, 3, or 4.
If q=0 then q100=0; if q=1 then q100=1.
Let q=2; we want the remainder after 2100 is divided by
125, so we work modulo 125. Now 27=128 º 3 where the
symbol ' º ' indicates that the numbers have the same
remainder after division by 125. For q=3 it follows that 35 = 243 º -7. Thus
2100 º 22×27×14
º 4×314
º 4×34 ×35×2
º 4×34 ×2432
º 4×81×(-7)2
= 4×81×49
= 15876 º 1
Similarly
3100 º 35×20
º 24320
º (-7)20
º (-32)6×(-7)2
º 230 ×49
º 27 ×4×4 ×49
º 34 ×4 ×49
= 15876 º 1
If q=4 then
q100 =
æ è
2100
ö ø
2
º 1.
So we can either get 0 or 1 as a remainder and we get 0 if the
original number is a multiple of 5 and 1 otherwise.