(Find all prime numbers $p$ such that there exist strictly positive integers $x, y$ such that

$$
x\left(y^{2}-p\right)+y\left(x^{2}-p\right)=5 p
$$
We start by rewriting the equation $(x+y+5) p=x y(x+y)$. By Gauss's lemma, $p$ divides one of the factors on the right. If $p$ divides $x$, we set $x=k p$ and we have $k y(x+y)=x+y+5$ so $(k y-1)(x+y)=5$. We get $x+y=5, k y-1=1$. Then we have either $y=1, k=2$ which gives the solution $(4,1)$ for $p=2$, or $y=2, k=1$ which gives the solution $(3,2)$ for $p=3$. If $p$ divides $y$, it's the same by swapping $x$ and $y$. Finally, if $p$ divides $x+y$, we set $x+y=k p$ and we have $k p+5=k x y$ so $k(x y-p)=5$. $k$ is positive, so the two factors on the left are positive and we have two cases: if $k=1$ we find $x y-p=5$ so $x y-x-y=5$ and $(x-1)(y-1)=6$ which gives the solutions $(2,7),(3,4),(4,3),(7,2)$. Since $p=x+y$, we find $p=7$, and we verify that $(3,4)$ works for $p=7$. If $k=5$, we have $x y-p=1$ so $25 x y-5 x-5 y=25$ and $(5 x-1)(5 y-1)=26$. We easily verify that no divisor of 26 is congruent to -1 modulo 5, so there are no other solutions.

The solutions for $p$ are therefore $2,3,7$.

## 4 End of Course Training

Please write each problem on a different sheet. Do not forget to write your name and each exercise number. Calculators and protractors are not allowed.