3. Find all pairs of natural numbers $x, y$ such that $\frac{x y^{2}}{x+y}$ is a prime number.
SOLUTION. Let's assume that natural numbers $x, y$ and prime number $p$ satisfy the equation

$$
\frac{x y^{2}}{x+y}=p
$$

Let the greatest common divisor of the numbers $x, y$ be $d$. Then $x=d a$ and $y=d b$, where the natural numbers $a, b$ are (already) coprime. After substituting into equation (1), removing the fraction by multiplication, and dividing by the positive number $d$, we get

$$
d^{2} a b^{2}=p(a+b)
$$

The numbers $a$ and $b$ are coprime, so the numbers $b^{2}, a+b$ on different sides of equation (2) are also coprime. ${ }^{2}$ This, according to a known rule, ${ }^{3}$ means that $b^{2} \mid p$. The prime number $p$ has only two divisors: the numbers 1 and $p$, the latter of which is not a square, so it must be $b=1$. Substituting into (2) we get

$$
d^{2} a=p(a+1)
$$

Let's repeat a similar consideration as before. Since $a$ divides the left side of equation (3), it also divides its right side, which, given the obvious coprimality of the numbers $a, a+1$, leads to the conclusion that $a \mid p$. Therefore, either $a=1$ or $a=p$. We will now evaluate both cases separately.

Substituting $a=1$ into (3) gives $d^{2}=2 p$. Since $p$ is a prime number, the number $2 p$ is a square only in the case $p=2$. Then it also holds that $d=2$ and the result leads to the first suitable pair $x=d a=2, y=d b=2$.

Substituting $a=p$ into (3) and dividing by the positive $p$ gives $d^{2}=p+1$ or $p=(d+1)(d-1)$. Such a factorization of the prime number $p$ into two factors $(d-11$, the number $d$ would divide their difference, which equals the number $a$, so the number $d$ would divide both $a$ and $b$, a contradiction. b) If the numbers $b^{2}$ and $a+b$ had a common divisor $d>1$, they would also have a common prime factor $p$, which would divide not only $b^{2}$ but also $b$, so the numbers $b$ and $a+b$ would be coprime, which would contradict the result a). c) From the equality $(a+b)^{2}-\left(a^{2}+b^{2}\right)=2 a b$ it follows that if the numbers $a+b, a^{2}+b^{2}$ had a common odd prime factor, it would also be a prime factor of the product $2 a b$, and thus a prime factor of at least one of the numbers $a, b$, which would again contradict the result a).]

N2. If for integers $k, l, m$ the relations $\operatorname{nsd}(k, l)=1$ and $k \mid l m$ hold, then $k \mid m$; prove. $[\mathrm{Z} k \mid l m$ implies $l m=k t$ for some integer $t$. Comparing the prime factorization of the number $l m=k t$ given the coprimality of the numbers $k, l$ implies that every prime factor of the number $k$ must be a prime factor of the number $m$ (more precisely: every prime factor $p$ of the number $k$ is represented in the factorization of the number $m$ as many times as it is represented in the factorizations of $k$ and $t$ together). This means that $k \mid m$.]

D1. Determine all pairs of prime numbers $p, q$ for which $p+q^{2}=q+p^{3}$. [55-B-II-1]

D2. Find all pairs of prime numbers $p$, $q$ for which $p+q^{2}=q+145 p^{2}$. $[55-\mathrm{C}-\mathrm{II}-4]$

2 See problem N1.

3 See problem N2.