Natural number solutions to $\frac{xy}{x+y}=n$ (equivalent to $\frac 1x+\frac 1y=\frac 1n$)

HINT:

Utilize $$(x-n)(y-n)=n^2$$


This can be rewritten as

$$\frac 1x+\frac 1y=\frac 1n$$

$$\frac 1y=\frac 1n-\frac 1x$$ $$y=\frac{nx}{x-n}$$

Changing variables to $k=x-n$:

$$y=\frac{n(n+k)}{k}$$

$$y=\frac{n^2}k+n$$

The left side is an integer. What does that tell you about the allowed values of $k$, and the corresponding number of valid $x$ values?


Let $d=\gcd (x,y)$ and $x=dp, y=dq$ and $\gcd (p,q)=1$. Then we have $$\frac{dpq}{p+q}=n$$ Now $\gcd(pq,p+q)=1$ implies $(p+q)|d$. So $d=k(p+q)$ where $k\in\mathbb{N}$. Hence all the solutions are given by, $$x=kp(p+q), y=kq(p+q)$$ where $k,p,q\in\mathbb{N}$, $\gcd(p,q)=1$ and $n=kpq$.