If $p$ is a prime number and $x, y$ are positive integers, find in terms of $p$, all pairs $(x, y)$ that satisfy the equation: $$p(x -2) = x(y -1).$$If $x+y = 21$, find all triples $(x, y, p)$ that satisfy this equation.
Source: 2015 Cuba 2.7
Tags: number theory, diophantine, Diophantine equation
If $p$ is a prime number and $x, y$ are positive integers, find in terms of $p$, all pairs $(x, y)$ that satisfy the equation: $$p(x -2) = x(y -1).$$If $x+y = 21$, find all triples $(x, y, p)$ that satisfy this equation.