Exercise 6. Find all prime numbers $p, q$ satisfying $p^{5}+p^{3}+2=q^{2}-q$.
Solution to Exercise 6 What we know about prime numbers is their divisibility properties. An expanded expression is therefore not very practical for studying this: we will first try to factorize.

Notice that $p^{5}+p^{3}+2=p^{3}\left(p^{2}+1\right)+2$. We want to solve $p^{3}\left(p^{2}+1\right)=q^{2}-q-2$. But then we recognize $q^{2}-q-2=(q-2)(q+1)$ (if we don't see it directly, we can find it by solving $\mathrm{q}^{2}-\mathrm{q}-2=0$ using the standard method involving the discriminant).

We want to solve $p^{3}\left(p^{2}+1\right)=(q-2)(q+1)$. In particular, $p^{3} \mid (q-2)(q+1)$. Then $\operatorname{pgcd}(q-2, q+1)=\operatorname{pgcd}(q-2, q+1-(q-2))=\operatorname{pgcd}(q-2,3)$ is therefore 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 $\mathrm{q}=17$ (which is a prime number) and $\mathrm{q}=-16$ (which is not a solution because it is not a prime number). 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{pgcd}(q-1, q+2)$, so at least one of the numbers $q+1$ and $q-2$ is coprime with $p$, and thus with $p^{3}$. Since $p^{3} \mid (q+1)(q-2)$: by Gauss's lemma, $q+1$ or $q-2$ is divisible by $p^{3}$. However, $p^{3}$ cannot divide $q-2$ because otherwise, we would have $(q-2)(q+1) \geqslant p^{3} p^{3}>p^{3}\left(p^{2}+1\right)$, which is absurd. Thus $p^{3} \mid q+1$, and therefore $q-2 \mid p^{2}+1$.

But the divisibilities we have just obtained show that $\mathrm{p}^{3} \leqslant \mathrm{q}+1=(\mathrm{q}-2)+3 \leqslant \mathrm{p}^{2}+1+3=\mathrm{p}^{2}+4$, and thus $p^{2}(p-1) \leqslant 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 it we find $\mathrm{q}=7$ (which is valid because 7 is a prime number) and $\mathrm{q}=-6$ (which is not valid because it is not a prime number).

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

Comment from the graders: The exercise was quite approached, but many errors were made. When we have an equation of the form $a b=c d$, we cannot conclude that $c$ is equal to $a$ or $b$, or that $c$ divides $a$ or $b$. Many students therefore use false arithmetic statements, and thus end up with few points as they only treat a very particular case.