## Task 23/87

There are prime numbers $p_{i}$ that have the following properties:

1. They are (in decimal notation) truly four-digit.
2. Their digit sum is $Q\left(p_{i}\right)=25$.
3. If you add 4 to them, the result is a "mirror number".

A "mirror number" is a number whose sequence of digits is symmetric with respect to an imaginary central line. Determine all such prime numbers $p_{i}$!
For the prime numbers $p_{i}$, it holds according to Property 1:

$$
p_{i}=1000 a_{i}+100 b_{i}+10 c_{i}+d_{i}
$$

with $a_{i} ; b_{i} ; c_{i} ; d_{i} \in N, 0<a_{i} \leq 9,0 \leq b_{i} ; c_{i} ; d_{i} \leq 9$. As the unit digit $d_{i}$ of a prime number, only the numbers $d_{i}=1, d_{2}=3, d_{3}=7$ and $d_{4}=9$ are possible.

From Property 3, it follows that $a_{1}=5, a_{2}=7, a_{3}-10=7+4-10=1$ and $a_{4}-10=9+4-10=3$ (the tens carry cannot extend to $a_{i}$, otherwise $a_{3}=0$ would contradict Property 1 or $a_{4}=2, b_{4}=c_{4}=9$ would contradict Property 2). Thus, the numbers in question have the form

$$
\begin{aligned}
& p_{1}=5000+100 b_{1}+10 c_{1}+1 \\
& p_{2}=7000+100 b_{2}+10 c_{2}+3 \\
& p_{3}=1000+100 b_{3}+10 c_{3}+7 \\
& p_{4}=3000+100 b_{4}+10 c_{4}+9
\end{aligned}
$$

The possibility $p_{1}$ is excluded because from Property 2 it follows that $b_{1}+c_{1}=19$, which contradicts $b_{1}+c_{1} \leq 9+9=18$. Furthermore, $p_{2}$ is also excluded because according to the same property, $b_{2}+c_{2}=15$ would be required, but from Property 3, $b_{2}=c_{2}$ follows.

From Property 2, it follows that $b_{3}+c_{3}=17, b_{4}+c_{4}=13$, and from Property 3 (due to the tens carry) $b_{i}=c_{i}+1$. Thus, $b_{3}=9, c_{3}=8, p_{3}=1987; b_{4}=7, c_{4}=6, p_{4}=3769$.

Indeed, both numbers are prime numbers.

Additional: If the word "proper" is removed from Property 1, $p_{i}=0997$ also satisfies the conditions of the problem. From Property 2, one can easily exclude further solutions.