Find all primes such that there exist positive integers that satisfy .
Solution
Rearrange the original equation to get \begin{align*} 5p &= xy^2 + x^2 y - xp - yp \\ &= xy(x+y) -p(x+y) \\ &= (xy-p)(x+y) \end{align*} Since , , and are all integers, and must be a factor of . Now there are four cases to consider.
Case 1: and
Since and are positive integers, , so the first case can not happen.
Case 2: and
Rearranging the first equation results in . By substitution, we get \begin{align*} x+y &= 5xy - 5 \\ 5 &= 5xy - x - y \\ 25 &= 25xy - 5x - 5y. \end{align*} Applying Simon's Favorite Factoring Trick results in .
From this equation, and can equal 1, 2, 13, or 26. Since no value of or work, there are no solutions, so the second case can not happen.
Case 3: and
Rearranging the first equation results in . By substitution and Simon's Favorite Factoring Trick, we get \begin{align*} xy-5 &= x+y \\ xy-x-y &= 5 \\ (x-1)(y-1) &= 6 \end{align*} From this equation, and can equal 1, 2, 3, or 6. The ordered pairs of can be , , , or . Since is prime, can equal in this case.
Case 4: and
Rearranging the first equation results in . Since are positive integers, we can simply take the few ordered pairs that satisfy the second equation and plug the values into the first equation to check for values of .
If is or , then , so . If is or , then , so . Both and are prime numbers, so both of the numbers work for .
In summary, the values of that satisfy the original conditions are .