Olympiad Maths Prep

Track / Stage 5 / 183 of 400 #783 of 2000

Problem 783

AIME late
Number theory Difficulty 5.5 Find the answer

54*. Let NN be an even number not divisible by 10. What will be the tens digit of the number N20N^{20}? What will be the hundreds digit of the number N200N^{200}?

Official solution

54. Let's find the last two digits of the number N20N^{20}. The number N20N^{20} is divisible by 4 (since NN is even). Further, the number NN is not divisible by 5 (otherwise it would be divisible by 10) and, therefore, can be represented in the form 5k±15k \pm 1 or in the form 5k±25k \pm 2 (see the solution to problem 51). But the number

(5k±1)20=(5k)20±20(5k)19++201912(5k)2±205k+1 (5k \pm 1)^{20} = (5k)^{20} \pm 20(5k)^{19} + \ldots + \frac{20 \cdot 19}{1 \cdot 2}(5k)^{2} \pm 20 \cdot 5k + 1

gives a remainder of 1 when divided by 25, and the number

(5k±2)20=(5k)20±20(5k)192++201912(5k)2218±205k219+220 \begin{aligned} &(5k \pm 2)^{20} = (5k)^{20} \pm 20(5k)^{19} \cdot 2 + \ldots \\ & \ldots + \frac{20 \cdot 19}{1 \cdot 2}(5k)^{2} \cdot 2^{18} \pm 20 \cdot 5k \cdot 2^{19} + 2^{20} \end{aligned}

gives the same remainder when divided by 25 as the number 220=(210)2=(1024)2=(10251)22^{20} = (2^{10})^2 = (1024)^2 = (1025-1)^2, i.e., also a remainder of 1. From the fact that the number N20N^{20} gives a remainder of 1 when divided by 25, it follows that the last two digits of this number can only be 01, 26, 51, or 76. Considering that N20N^{20} must be divisible by 4, we get that the last two digits of this number can only be 76. Therefore, the tens digit of the number N20N^{20} is 7.

Now let's find the last three digits of the number N200N^{200}. The number N200N^{200} is divisible by 8. Further, since NN is coprime with 5, N100N^{100} gives a remainder of 1 when divided by 125 (see the solution to problem 51): N100=125k+1N^{100} = 125k + 1. But then N200=(125k+1)2=1252k2+250k+1N^{200} = (125k + 1)^2 = 125^2 k^2 + 250k + 1 also gives a remainder of 1 when divided by 125. Therefore, N200N^{200} can end in the digits 126, 251, 376, 501, 626, 751, or 876; but since N200N^{200} is divisible by 8, it must end in the digits 376. Therefore, the hundreds digit of the number N200N^{200} is 3.

Note. It is easy to see that the number N100N^{100} must already end in the three digits 376.

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