IMO 2003 SL N2
Each positive integer a undergoes the following procedure in
IMO 2003 SL N2
Origin: USA | Category: Number Theory
Problem
Each positive integer a undergoes the following procedure in order to obtain the number d = d(a): (1) move the last digit of a to the first position to obtain the number b; (2) square b to obtain the number c; (3) move the first digit of c to the end to obtain the number d. (All the numbers in the problem are considered to be represented in base 10.) For example, for a = 2003, we have b = 3200, c = 10240000, and d = 02400001 = 2400001 = d(2003). Find all numbers a for which d(a) = a2.
Solution
Let a be a positive integer for which d(a) = a2. Suppose that a has n + 1 digits, n \geq0. Denote by s the last digit of a and by f the first digit of c. Then a = ∗. . . ∗s, where ∗stands for a digit that is not important to us at the moment. We have ∗. . . ∗s2 = a2 = d = ∗. . . ∗f and b2 = s ∗. . . ∗2 = c = f ∗. . . ∗. We cannot have s = 0, since otherwise c would have at most 2n digits, while a2 has either 2n + 1 or 2n + 2 digits. The following table gives all possibilities for s and f: s f = last digit of ∗. . . ∗s2 f = first digit of s ∗. . . ∗2 1, 2, 3 4 −8 9, 1 1, 2 2, 3 3, 4 4, 5, 6 6, 7, 8 8, 9 We obtain from the table that s \in{1, 2, 3} and f = s2, and consequently c = b2 and d have exactly 2n + 1 digits each. Put a = 10x + s, where x < 10n. Then b = 10ns + x, c = 102ns2 + 2 \cdot 10nsx + x2, and d = 2\cdot10n+1sx+10x2 +s2, so from d = a2 it follows that x = 2s\cdot 10n−1 . Thus a = 6 . . . 6 n 3, a = 4 . . . 4 n 2 or a = 2 . . . 2 n
- For n \geq1 we see that a cannot be a = 6 . . . 63 or a = 4 . . . 42 (otherwise a2 would have 2n + 2 digits). Therefore a equals 1, 2, 3 or 2 . . . 2 n 1 for n \geq0. It is easy to verify that these numbers have the required property.