1. Determine all integers $x$ for which the number $9 x^{2}-40 x+39$ is a power of a prime. (A natural number $m$ is a power of a prime if $m=p^{a}$ for some prime $p$ and non-negative integer $a$.)
III/1. Let $9 x^{2}-40 x+39=p^{n}$ for some prime $p$ and non-negative integer $n$. From

$$
p^{n}=9 x^{2}-40 x+39=(9 x-13)(x-3)
$$

it follows that $9 x-13=p^{k}$ and $x-3=p^{l}$ or $9 x-13=-p^{k}$ and $x-3=-p^{l}$ for some numbers $k$ and $l$, where $0 \leq l<k$ and $n=k+l$.

First, let's solve the system of equations $9 x-13=p^{k}$ and $x-3=p^{l}$. We have $9\left(p^{l}+3\right)-13=p^{k}$, or $14=p^{k}-9 p^{l}=p^{l}\left(p^{k-l}-9\right)$. If $l=0$, we get $p^{k}=23$, so $p=23, k=1$ and $x=4$. Otherwise, $l \geq 1$ and $p^{l} \mid 14$, so $p^{l}=2$ and $p^{k-l}-9=7$ or $p^{l}=7$ and $p^{k-l}-9=2$. In the first case, we get $p=2, l=1, k=5$ and $x=5$, and in the second case, there is no solution.

Next, we need to consider the system of equations $9 x-13=-p^{k}$ and $x-3=-p^{l}$. Then $14=$ $p^{l}\left(9-p^{k-l}\right)$. The only possibilities are $p=2, l=1$ or $p=7, l=1$ (in this case $l=0$ is not possible). The corresponding numbers are $x=1$ and $x=-4$.

The numbers that satisfy the problem are $x=-4, x=1, x=4$ and $x=5$.

![](https://cdn.mathpix.com/cropped/2024_06_07_c45646d9586b6df064a6g-11.jpg?height=49&width=1627&top_left_y=1363&top_left_x=220)

Writing down the third solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 point

Writing down the fourth solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 point

![](https://cdn.mathpix.com/cropped/2024_06_07_c45646d9586b6df064a6g-11.jpg?height=57&width=1633&top_left_y=1511&top_left_x=220)

Conclusion $9 x-13=p^{k}$ and $x-3=p^{l}$ or $9 x-13=-p^{k}$ and $x-3=-p^{l} \ldots \ldots \ldots \ldots$.

![](https://cdn.mathpix.com/cropped/2024_06_07_c45646d9586b6df064a6g-11.jpg?height=52&width=1627&top_left_y=1613&top_left_x=223)

Complete handling of the case $9 x-13=-p^{k}$ and $x-3=-p^{l} \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots$ point

If a contestant's approach does not allow obtaining all solutions to the problem, the contestant can earn 1 point if their method can lead to three solutions of the problem.