Exercise 13. Find all prime numbers $p, q$ satisfying $p^{5}+p^{3}+2=q^{2}-q$.
Solution to Exercise 13 By rearranging the terms and factoring, it comes down to solving \( p^{3}(p^{2} + 1) = (q-2)(q+1) \). In particular, \( p^{3} \mid (q-2)(q+1) \). Since \((q+1) - (q-2) = 3\), \(\operatorname{gcd}(q-2, 3)\) is either 1 or 3. This suggests studying the case \( p = 3 \) first: we get \((q-2)(q+1) = 270\), and by solving \( q^{2} - q - 2 = 270 \) we find \( q = 17 \) (which works) and \( q = -16 \) (which does not work). Therefore, when \( p = 3 \), there is a unique solution \((\mathbf{p}, \mathbf{q}) = (3, 17)\).

We can therefore assume \( p \neq 3 \). In particular, it does not divide \(\operatorname{gcd}(q-1, q+2)\), so at least one of the numbers \( q+1 \) and \( q-2 \) is coprime with \( p^{3} \). Since \( p^{3} \mid (q+1)(q-2) \): either \( q+1 \) or \( q-2 \) is divisible by \( p^{3} \) (Gauss). However, \( p^{3} \) cannot divide \( q-2 \) because otherwise, we would have \((q-2)(q+1) \geqslant p^{3} p^{3} > p^{3}(p^{2} + 1)\), which is absurd. Thus \( p^{3} \mid q+1 \), and therefore \( q-2 \mid p^{2} + 1 \).

But \( p^{3} \leq q+1 = (q-2) + 3 \leq p^{2} + 1 + 3 = p^{2} + 4 \), and thus \( p^{2}(p-1) \leq 4 \). Since \( p^{2}(p-1) \) is strictly increasing in \( p \), and at \( p = 2 \) we have equality, the only possible case is \( p = 2 \) (in other words, for \( p > 2 \), we have \( p^{2}(p-1) > 4 \)).

When \( p = 2 \), the equation becomes \( q^{2} - q - 2 = 40 \), and by solving we find \( q = 7 \) (which works) and \( q = -6 \) (which does not work).

Finally, there are two solutions which are \((\mathbf{p}, \mathbf{q}) = (2, 7)\) and \((\mathbf{p}, \mathbf{q}) = (3, 17)\).

Graders' Comment: This was well done by most students, who almost all found the factorization into \((q+1)(q-2)\) or that into \((x-3)(x+3)\) once the discriminant in \( q \) was considered. In general, the reasoning was well conducted. Be careful of some fraudulent uses of Gauss's lemma, and to rigorously verify all cases when making a case distinction. It is easy to forget a solution!