Maths Olympiad Prep

Track / Stage 5 / 279 of 400 #879 of 1964

Problem 879

AIME late
Number theory Difficulty 5.7 Find the answer

What could be the last two digits of an integer raised to the twentieth power?

A number or a short expression. Spacing, $ signs and \frac vs / are all fine.

Official solution

Every integer can be written in the form 10a+b10a + b, where a,ba, b are integers and 0b90 \leq b \leq 9. The twentieth power of this, according to the binomial theorem, is

(10a)20+(201)(10a)19b++(2019)(10a)b19+b20 (10a)^{20} + \binom{20}{1} \cdot (10a)^{19} \cdot b + \ldots + \binom{20}{19} (10a) \cdot b^{19} + b^{20}

Here, the first 19 terms are clearly divisible by 100, and even the twentieth term is: (2019)(10a)b19=200ab19\binom{20}{19} \cdot (10a) \cdot b^{19} = 200 \cdot a \cdot b^{19}. Therefore, the last two digits of (10a+b)20(10a + b)^{20} are the same as the last two digits of b20b^{20}, and 0b90 \leq b \leq 9. Let's calculate these!

Clearly, the last two digits of 0200^{20} are 00, and 1201^{20} ends in 01. Furthermore, 220=10485762^{20} = 1048576, and its last two digits are 76. It is also evident that 5205^{20} ends in 25, because 52=255^2 = 25, and from this, by successively multiplying the last two digits by 5, we get the last two digits of higher powers of 5; but 525=1255 \cdot 25 = 125 also ends in 25, so 5205^{20} does as well.

From the binomial theorem, (10b)10b10=1010(101)109b+(102)108b2(109)10b9(10 - b)^{10} - b^{10} = 10^{10} - \binom{10}{1} \cdot 10^9 \cdot b + \binom{10}{2} \cdot 10^8 \cdot b^2 - \ldots - \binom{10}{9} \cdot 10 \cdot b^9, and similarly to the above, this is divisible by 100. Therefore, b10b^{10} ends in the same two digits as (10b)10(10 - b)^{10}, and thus the last two digits of b20b^{20} and (10b)20(10 - b)^{20} are the same. From this, it immediately follows that 9209^{20} also ends in 01, and 8208^{20} ends in 76. For b=3b = 3, 320=9103^{20} = 9^{10}, and the last two digits of 9109^{10} are the same as those of 1101^{10}, which means 3203^{20} also ends in 01. Therefore, the same applies to 7207^{20}.

Let's consider the case b=4b = 4. For this, 420=(220)24^{20} = (2^{20})^2, but the last two digits of 2202^{20} are 76, so 4204^{20} ends in the same two digits as 76276^2, and 762=577676^2 = 5776, so the last two digits of 4204^{20} are 76, and the same applies to 6206^{20}.

In summary: the last two digits of the twentieth power of an integer can be 00,01,25,7600, 01, 25, 76.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.