4.- Find the integer solutions of the equation:

where p is a prime number.

$$
p \cdot(x+y)=x \cdot y
$$
Solution:

Since $\mathrm{p}$ is prime, $\mathrm{p} \neq 0$ and $\mathrm{p} \neq 1$. From the equation, it follows that $\mathrm{p}$ divides $\mathrm{x}$ or $\mathrm{p}$ divides $\mathrm{y}$. Since the equation is symmetric with respect to $\mathrm{x}$ and $\mathrm{y}$, if $(\alpha, \beta)$ is a solution, then $(\beta, \alpha)$ is also a solution.

If $\mathrm{p}$ divides $\mathrm{x}$, then $\mathrm{x} = \mathrm{p} \cdot \mathrm{a}$, where $\mathrm{a} \in \mathrm{Z}$. The equation can be rewritten as:

$$
p(p a + y) = p a y \Rightarrow p a + y = a y \Rightarrow y = \frac{p a}{a - 1} \text{ since a is an integer }
$$

Furthermore, $\mathrm{a}$ and $\mathrm{a} - 1$ are coprime, so $\mathrm{a} - 1$ divides $\mathrm{p}$. Since $\mathrm{p}$ is prime, there are only four possibilities: $\mathrm{a} - 1 = \pm 1$ and $\mathrm{a} - 1 = \pm \mathrm{p}$.

Let's examine all cases.

i) $\mathrm{a} - 1 = -1$, then $\mathrm{a} = 0$, $\mathrm{x} = 0$, $\mathrm{y} = 0$

ii) $\mathrm{a} - 1 = 1$, then $\mathrm{a} = 2$, $\mathrm{x} = 2 \mathrm{p} \Rightarrow \mathrm{y} = \frac{2 \mathrm{p}}{2 - 1} = 2 \mathrm{p}$.

iii) $\mathrm{a} - 1 = \mathrm{p}$, then $\mathrm{a} = \mathrm{p} + 1$, $\mathrm{x} = \mathrm{p}(\mathrm{p} + 1) \Rightarrow \mathrm{y} = \frac{\mathrm{p}(\mathrm{p} + 1)}{\mathrm{p} + 1 - 1} = \mathrm{p} + 1$.

iv) $\mathrm{a} - 1 = -\mathrm{p}$, then $\mathrm{a} = 1 - \mathrm{p}$, $\mathrm{x} = \mathrm{p}(1 - \mathrm{p}) \Rightarrow \mathrm{y} = \frac{\mathrm{p}(1 - \mathrm{p})}{1 - \mathrm{p} - 1} = \mathrm{p} - 1$.

In summary, the solutions are: $(0, 0)$; $(2 \mathrm{p}, 2 \mathrm{p})$; $(\mathrm{p}(\mathrm{p} + 1), \mathrm{p} + 1)$; $(\mathrm{p}(1 - \mathrm{p}), \mathrm{p} - 1)$; and by symmetry, we add $(\mathrm{p} + 1, \mathrm{p}(\mathrm{p} + 1))$; $(\mathrm{p} - 1, \mathrm{p}(1 - \mathrm{p}))$.