Diophantine equation: $\frac1x=\frac{a}{x+y}-\frac1y$ For how many different natural values of $a$ the  Diophantine equation: $\frac1x=\frac{a}{x+y}-\frac1y$ has natural roots?
I rearranged the equation as: $xy+x^2+y^2=(a-1)xy$ , hence I said we must have: $(a-1)>2$
I tried another idea: reform the equation to: $x^2+(2-a)yx+y^2=0$ , considering this as a second order equation in terms of x, the Delta must be non negative and perfect square,but now I can't go on!!
Please help.
 A: Write
$$(x+y)^2=axy$$
If some prime $p$ divides $x$, also divides $x+y$, so $p\mid y$. Similarly, every prime that divides $y$ divides $x$. So $x$ and $y$ have the same prime factors.
Say now that the prime factor $p$ is $n$ times in $x$, that is, $p^n$ divides $x$ but $p^{n+1}$ doesn't. Then $x=p^nu$ and $p$ does not divide $u$. Similarly, write $y=p^mv$. Then
$$(p^nu+p^mv)^2=ap^{m+n}uv$$
or
$$p^{2n}u^2+2p^{m+n}uv+p^{2m}v^2=ap^{m+n}uv$$
This equatiion implies that $m=n$, since assuming $n<m$ or $m<n$ leads to contradiction.
We have proved that $x$ and $y$ have the same prime factors with same exponents. That is, $x=y$.
For $x=y$ we find easily the only possible value for $a$ is $a=4$.
A: Rearrange it to
$$\frac{a}{x+y} = \frac{1}{x} + \frac{1}{y} = \frac{y+x}{xy}.\tag{1}$$
Multiply $(1)$ with $x+y$ to obtain
$$a = \frac{(x+y)^2}{xy}.\tag{2}$$
So the question is how many natural numbers are values of $\frac{(x+y)^2}{xy}$ with $x,y\in \mathbb{N}$. Suppose $x,y\in \mathbb{N}$ with $\frac{(x+y)^2}{xy}\in \mathbb{N}$. Write $x = d\cdot \xi$ and $y = d\cdot\eta$ with $d = \gcd(x,y)$. Then
$$\frac{(x+y)^2}{xy} = \frac{(d\xi + d\eta)^2}{d\xi d\eta} = \frac{d^2(\xi + \eta)^2}{d^2\xi \eta} = \frac{(\xi + \eta)^2}{\xi \eta}.$$
In particular $\xi \mid (\xi + \eta)^2$, whence $\xi \mid \eta^2$. Since $\gcd(\xi,\eta) = 1$, it follows that $\xi = 1$. By symmetry, we also have $\eta = 1$, so
$$\frac{(\xi + \eta)^2}{\xi\eta} = \frac{2^2}{1^2} = 4.$$
It follows that $a = 4$ is the only natural number for which $(1)$ has natural solutions.
