How many pairs of natural numbers $(x,y)$, satisfy the equation $\space xy=x+y+\gcd(x,y)$. How many pairs of natural numbers $(x,y)$, satisfy the equation  
$\space xy=x+y+\gcd(x,y)$. You may assume that $x≤y$.

If $x=1$ then $\gcd(x,y)=1$ and $x+y+\gcd(x,y)=y+2\ne 1\cdot y$. Hence we may assume $x\ge 2$.
As $\gcd(x,y)\le x$, we have $xy\le y+2x$, so 
$$(x-1)(y-2)=xy-y-2x+2\le 2 $$
which leads to $y\le 4$. As wlog. $x\le y$, we need only check the few candidates $(2,2),(2,3),(2,4),(3,3),(3,4),(4,4)$.

Alternatively (again assuming wlog. $x\le y$), we have $(x-y)(y-1)=\gcd(x,y)+1$.


*

*If $\gcd(x,y)=1$ then $(x-1)(y-1)=2$ and from the only factorization of $2$ we get $x=2$,$y=3$.

*If  $\gcd(x,y)=2$ then $(x-1)(y-1)=3$ and from the only factorization of $3$ we get $x=2$,$y=4$.

*If  $\gcd(x,y)=3$ then $(x-1)(y-1)=4$ and from the only factorizations of $4$ we get $x=2$,$y=5$ (but then $\gcd=1$) or $x=y=3$.

*If $\gcd(x,y)\ge 4$ then $x\ge 4$ and $3y\ge x+y+\gcd(x,y)=xy\ge 4y$, contradiction.
