## Task 18/86

It is to determine the smallest number $n \in N$ with the following properties:

Its unit digit (in decimal notation) is 7. If this is removed and placed as the highest digit, the result is $5 n$.
Let $n=10 a+7$ with $a \in \mathbb{N}$ and $a \neq 0$. The number $a$ has $b$ digits with $b \in \mathbb{N}$ and $b \neq 0$. Therefore, the conditions of the problem can be represented by the following equations:

$$
5 n=5(10 a+7)=7 \cdot 10^{b}+8 ; \quad 49 a+35=7 \cdot 10^{b} ; \quad 7 a=10^{b}-5 ; \quad a=\frac{1}{7}\left(10^{b}-5\right)
$$

From this, it follows that $10^{b} \equiv 5(\bmod 7)$. Therefore, (due to the minimality of $a$), the smallest power of $10$ that leaves a remainder of 5 when divided by 7 needs to be found. By systematic trial, one quickly finds $b=5, 10^{5}-5=99995=7 \cdot 14285, a=14285$ and $n=142857$. Indeed, $714285=5 \cdot 142857$.

Additional: At first glance, it is surprising that the periods of the fractions $\frac{1}{7}$ and $\frac{5}{7}$ are obtained. Upon deeper investigation, this is explained by the properties of the period of these fractions.