39. Find the smallest integer starting with the digit 7 that decreases threefold when this digit is moved to the end. Find all such numbers.
39. First solution. Let the unknown digits of the desired number be denoted by $x, y, \ldots, z, t$. In this case, using the notation from the second solution of problem 34 a), we have:

$$
\text { - } \overline{7 x y \ldots z t} \cdot \frac{1}{3}=\overline{x y \ldots z t 7}
$$

or

$$
\overline{x y \ldots z t 7} \cdot 3=\overline{7 x y \ldots z t}
$$

It is immediately clear that $t=1$; after this, we can determine the digit $z$ (17.3 ends in 51; hence, $z=5$) and thus sequentially find new digits of the desired number. The calculation should be stopped when we reach the digit 7. It is convenient to arrange it as follows:

241379310344827586206896551

7241379310344827586206896551

(calculations are performed from right to left). Thus, the smallest number satisfying the conditions of the problem is 7241379310344827586206896551.

If we do not stop our calculations at the first 7 and continue further, we will obtain other numbers that satisfy the condition of the problem. All such numbers will have the form

![](https://cdn.mathpix.com/cropped/2024_05_21_b937612abb2773f7abffg-104.jpg?height=96&width=918&top_left_y=1018&top_left_x=119)

Second solution. Let $\overline{7 x y z \ldots t}$ be the desired number. Then, when dividing it by 3, we get the number $\overline{x^{\prime} z \ldots t 7}$. Let's write this as

![](https://cdn.mathpix.com/cropped/2024_05_21_b937612abb2773f7abffg-104.jpg?height=102&width=307&top_left_y=1246&top_left_x=404)

From this, it is clear that $x=2$. If we write this value in the dividend and the quotient, we can find the second digit of the quotient; using it, we can find the third digit of the dividend; from this, we can find the third digit of the quotient, and so on. The process will end when the last obtained digit of the quotient is 7, and the written dividend is divisible by 3 without a remainder.

It is easy to see that this number is the desired one, since if we move the 7 from the beginning to the end in it, we get the number we wrote as the quotient, i.e., one-third of it.

Since up to this point we were necessarily obtaining the next digit from the already written ones, the indicated number will be the smallest with the required property. The calculations can be arranged as follows: in the top line, we will write the digits of the dividend, in the second line - the number, dividing which by 3 gives the next digit of the quotient, and in the third line - this digit; $\begin{array}{llllllllllllllllllll}7 & 2 & 4 & 1 & 3 & 7 & 9 & 3 & 1 & 0 & 3 & 4 & 4 & 8 & 2 & 7 & 5 & 8 & 6 & 2\end{array}$ 71241123279311013142482217251862 $\begin{array}{llllllllllllllllllll}2 & 4 & 3 & 3 & 9 & 3 & 1 & 0 & 3 & 4 & 4 & 8 & 2 & 7 & 5 & 8 & 6 & 2 & 0\end{array}$

$$
\begin{array}{rrrrrrrrr}
0 & 6 & 8 & 9 & 6 & 5 & 5 & 1 \\
20 & 26 & 28 & 19 & 16 & 15 & 5 & 21 \\
6 & 8 & 9 & 6 & 5 & 5 & 1 & 7
\end{array}
$$

Thus, the smallest number with the required property is: 7241379310344827586206896551.

Third solution. Analogously to the first solution of problem 34 a), using similar notation, we will have:

$$
\left(7 \cdot 10^{m}+X\right) \cdot \frac{1}{3}=10 X+7
$$

from which

$$
X=\frac{7 \cdot 10^{m}-21}{29}
$$

Thus, the problem reduces to determining a number of the form $70000 \ldots$ which, when divided by 29, gives a remainder of 21. We leave it to the reader to verify that in this case, we arrive at the same result as in the first two solutions.

Note. Similarly, we can solve the following problem:

Find the smallest number starting with a known digit that decreases by 3 times when the first digit is moved to the end. To be able to search for solutions starting with the digits 1 and 2, we will assume that 0 can stand at the beginning of the number.

If the number starts with the digit 0, it is easy to verify that the only number with the required property is 0. Let's write down the other numbers with this property:

| 1 | 034 | 482 | 758 | 620 | 689 | 655 | 172 | 413 | 793 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| 2 | 068 | 965 | 517 | 241 | 379 | 310 | 344 | 827 | 586 |
| 3 | 103 | 448 | 275 | 862 | 068 | 965 | 517 | 241 | 379 |
| 4 | 137 | 931 | 034 | 482 | 758 | 620 | 689 | 655 | 172 |
| 5 | 172 | 413 | 793 | 103 | 448 | 275 | 862 | 068 | 965 |
| 6 | 206 | 896 | 551 | 724 | 137 | 931 | 034 | 482 | 758 |
| 8 | 275 | 862 | 068 | 965 | 517 | 241 | 379 | 310 | 344 |
| 9 | 310 | 344 | 827 | 586 | 206 | 896 | 551 | 724 | 137 |

In the same way, we can solve the problem:

Find the smallest integer starting with a given digit $a$ and decreasing by moving this digit to the end by a factor of 3. Find all such numbers.