MathDB
A perverse one

Source: German TST 2004, IMO ShortList 2003, number problem 2

May 18, 2004
number theorydecimal representationalgorithmcombinatoricsIMO Shortlist

Problem Statement

Each positive integer aa undergoes the following procedure in order to obtain the number d=d(a)d = d\left(a\right):
(i) move the last digit of aa to the first position to obtain the numb er bb; (ii) square bb to obtain the number cc; (iii) move the first digit of cc to the end to obtain the number dd.
(All the numbers in the problem are considered to be represented in base 1010.) For example, for a=2003a=2003, we get b=3200b=3200, c=10240000c=10240000, and d=02400001=2400001=d(2003)d = 02400001 = 2400001 = d(2003).)
Find all numbers aa for which d(a)=a2d\left( a\right) =a^2.
Proposed by Zoran Sunic, USA