## Task B-4.5.

Determine all prime numbers $p$ and $q$ for which the equation

$$
5 p^{3}-8 q+5 p-10=0
$$

holds.
## Solution.

Let's write the given equality in the form

$$
5\left(p^{3}+p-2\right)=8 q
$$

We conclude that $q$ must be divisible by 5, and since 5 is the only prime number divisible by 5, it must be $q=5$.

Now we have $5\left(p^{3}+p-2\right)=40$, or $p^{3}+p-10=0$.

If the polynomial on the left side of the equation has integer roots, they must be among the divisors of the constant term, i.e., one of the numbers $\pm 1, \pm 2, \pm 5, \pm 10$.

Since $p$ is a prime number, the only possibilities are: $p=2$ or $p=5$.

By simple verification, we find $p=2$.

Therefore, the numbers $p=2$ and $q=5$ are the only prime numbers for which the given equality holds.

Note: The student can also earn the last three points by factoring the polynomial:

$$
(p-2)\left(p^{2}+2 p+5\right)=0
$$

Since the equation $p^{2}+2 p+5$ has no solutions in the set of prime numbers, the only possibility is that $p=2$.