## Task 5 - V00805

Peter is an avid lottery player. The total sum of his five lottery numbers is 167. The first number, when multiplied by itself, equals the fourth number.

Twice the first number equals the second number, which, when its digits are reversed (units and tens swapped), equals the third number. Multiplying the second number by the third number and the second number by the fourth number, the half of the difference between these two products equals the fifth number.

What are Peter's lottery numbers?

Hint: In the lottery at that time, 5 numbers were picked from 90 possible numbers.
Let the lottery numbers be $a, b, c, d$ and $e$. The second number has the form $b=10 x+y$ with $1 \leq x, y \leq 9$. According to the problem, the following equations are derived:

\[
\begin{aligned}
a+b+c+d+e & =167 \\
a^{2} & =d \\
2 a & =b=10 x+y \\
10 y+x & =c \\
|b \cdot c-b \cdot d| & =2 e
\end{aligned}
\]

Since $d$ is the square of $a$ and 90 numbers are available, for $a: 1 \leq a \leq 9$. According to (3), the double of $a$ must be at least 10, and since not only $b$ but also $c$ must be truly two-digit, $a>10$.

Thus, the remaining possibilities are listed in the following table:

| $a$ | $b$ | $c$ | $d$ | $e$ | Sum |
| :---: | :---: | :---: | :---: | :---: | :---: |
| 6 | 12 | 21 | 36 | 90 | 173 |
| 7 | 14 | 41 | 49 | 56 | 167 |
| 8 | 16 | 61 | 64 | 24 | 173 |
| 9 | 18 | 81 | 81 | - |  |

$a=9$ is excluded because then $c=d$ would hold. Of the three remaining cases, only $a=7$ results in a sum of the numbers equal to 167. Peter's lottery numbers are 7, 14, 41, 49, and 56.