## Task B-3.2.

The first digit of a four-digit number is one greater than its third digit, and the second digit is equal to the sum of the remaining digits. The last digit of this number is five less than the first digit. Determine this four-digit number.
## Solution.

Let $\overline{a b c d}$ be the desired four-digit number. Then we have:

$$
\begin{aligned}
& a, b, c, d \in\{0,1,2,3, \ldots, 9\}, a \neq 0 \\
& a=c+1 \\
& b=a+c+d \\
& d=a-5
\end{aligned}
$$

From the first equation, it follows that $c=a-1$. Then from the second equation (by substituting the expressions for $c$ and $d$), we get

$$
b=a+a-1+a-5=3 a-6
$$

Since the digits $b, c, d$ must be from the set $\{0,1,2,3, \ldots, 9\}$, it follows that

$$
\begin{aligned}
& a-5 \geqslant 0 \Rightarrow a \geqslant 5 \\
& 3 a-6 \leqslant 9 \Rightarrow a \leqslant 5
\end{aligned}
$$

We conclude that the only possibility is $a=5$.

Then $b=3 \cdot 5-6=9, c=5-1=4, d=5-5=0$. The desired four-digit number is 5940.