2. Let $x$ be a positive integer, and $y$ is obtained from $x$ when the first digit of $x$ is moved to the last place. Determine the smallest number $x$ for which $3 x=y$.
Solution. Let $x$ be an $n$-digit number and the first digit of $x$ be $a(1 \leq a \leq 9)$. Then

$$
y=\left(x-10^{n-1} a\right) \cdot 10+a=10 x-a\left(10^{n-1}-1\right)
$$

Since $3 x=y$ must hold, we have $3 x=10 x-a\left(10^{n-1}-1\right)$, from which we get

$$
x=\frac{a\left(10^{n}-1\right)}{7}
$$

Since 7 is a prime number, 7 divides $a$ or $10^{n}-1$. However, if 7 divides $a$, then $a=7$, and the number $3 x$ will have more than $n$ digits and cannot be equal to $y$. Therefore, 7 divides $10^{n}-1$. The smallest value of $x$ is obtained for the smallest possible $n$. The smallest value of $n$ for which $10^{n}-1$ is divisible by 7 is $n=6$, and in this case, from (1) we get $x=\overline{a 142857}$. Setting $a=1$ to get the smallest value for $x$, we get $x=142857$. By direct verification, we confirm that for this value of $x$,

$$
3 x=3 \cdot 142857=428571=y
$$