Find prime pairs satisfying this equation

contest-mathdiophantine equationselementary-number-theoryprime numbers

$\textbf{Question:}$Find all pairs $(p, q)$ of $\textbf{prime numbers}$ satisfying

$ p^3+7q=q^9+5p^2+18p.$

$\textbf{My progress:}$
I assumed first that $p,q$ are both greater than $7$ for simplicity.
Then,
I found the following facts:

1.7 is a quadratic residue modulo p

2.$p \equiv 1 \pmod{4}$

3.$p$ is a quadratic non-residue modulo 7.

4.$p$ is 5 modulo 7 more precisely.

5.$q$ is a quadratic residue modulo 7.

Best Answer

For all prime $p, q$ we have $$(p-1)^3>p^3-5p-18p = q^9-7q \geq (q^3-1)^3$$ so we have $$\boxed{p\geq q^3+1}$$

Simillary we have, for $p>29$: $$(p-2)^3 < p^3-5p^2-18p<q^9$$

so $$\boxed{p-1\leq q^3}$$

This means that for $p>29$ we have $p=q^3+1$ which means $q$ is even and thus impossibile.

Now if $p\leq 29$. Since $p\geq q^3+1$ we get $q=2$ or $3$...

Related Question