1. A four-digit number (in the decimal system) is given. By changing the order of its digits, exactly eight other four-digit numbers can be formed. The sum of the smallest three of all these nine numbers is 12528. Determine the digits of the given number.
SOLUTION. First, we determine how many four-digit numbers can be formed from a fixed set of four digits. In the following considerations, we will denote non-zero digits by lowercase letters. Different letters never denote the same digit, and the symbol 0 denotes zero.

The quartets of digits $a, a, a, a$ and $a, 0,0,0$ each determine only one four-digit number. The digits $a, a, a, 0$ form three: $a a a 0, a a 0 a, a 0 a a$. From the digits $a, a, a, b (a \neq b)$, it is possible to form only four four-digit numbers: $a a a b, a a b a, a b a a, b a a a$.

From the digits $a, a, 0,0$, we can form only three numbers: $a a 00, a 0 a 0, a 00 a$. For the digits $a, a, b, b (a \neq b)$, we have a total of six possibilities: $a a b b, a b a b, a b b a, b a a b, b a b a, b b a a$. This is still not enough.

The digits $a, a, b, 0$ determine exactly nine numbers: $a a b 0, a a 0 b, a b a 0, a b 0 a, a 0 a b$, $a 0 b a, b a a 0, b a 0 a, b 0 a a$. By a similar procedure, we find that investigating further possibilities does not lead to a count of 9. An overview of all possible results is given in the following table.

| Type | $a 000$ | $a a a a$ | $a a a 0$ | $a a a b$ | $a a 00$ | $a a b b$ | $a a b 0$ | $a b 00$ | $a a b c$ | $a b c 0$ | $a b c d$ |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| Count | 1 | 1 | 3 | 4 | 3 | 6 | 9 | 6 | 12 | 18 | 24 |

The given number thus has the digits $a, a, b, 0$, where $a, b$ are different non-zero digits.

We distinguish two cases and write the written addition of the three smallest numbers in each of them:

$$
\begin{array}{rr}
\text { I. } ab \\
a 0 a b & b 0 a a \\
a 0 b a & b a 0 a \\
a a 0 b & \quad b a a 0 \\
\hline 12528 & 12528
\end{array}
$$

In case I, it is clear from the left two columns that $a=4$, and from the right column we get $2 b+4=8$ or $2 b+4=18$. The condition $a<b$ is satisfied only by $b=7$. It is easy to verify that the digits $a=4$ and $b=7$ are a solution to the problem.

In case II, it is clear from the right two columns that the number $2 a$ has the last digit 8 and at the same time 2 or 1. This, however, is not possible.

Another way to solve case I: The indicated sum can be rewritten in the form $3000 a+100 a+10(a+b)+a+2 b=12528$. By rearrangement, we easily find that $a=4+\frac{28-4 b}{1037}$. From the condition that the last fraction is an integer $k$, we get $b=7-\frac{1037 k}{4}, a=4+k$. It is clear that $a, b$ will be digits only for $k=0$.

Similarly, we can proceed in case II.

Conclusion: The digits of the sought number are $4,4,7$ and 0.

GUIDING PROBLEMS: