parmenides51 wrote:
Find all pairs $(p, q)$ of prime numbers such that $$p(p^2 -p - 1) = q(2q + 3).$$
$p \neq q$ easy.
Now: Ugly way is to just do $q = \frac{kp-3}{2}$ and as $q|p^2-p-1$ we have $kq = p^2-p-1$, we can get
$2p^2-p(2+k^2)-2+3k = 0$. Discriminant has to be perfect square so we get
$k^4+4k²-24k+20=x^2$ Now $(k^2)^2 \le x^2 < (k^2+2)^2$ for $k \ge 5$ (strict for $k \ge 6$). Manual bash $k=1,2,3,4$ and then $x^2=(k^2-1)^2$
so $p = \frac{(2+k^2)\pm(k^2-1)}{4}$. Positive cleraly, so $p = \frac{2k^2-1}{4}$, impossible.
Therefore, check $k=1,2,3,4$ and solve.