Finding integer solutions to sum of reciprocals of x and y

diophantine equations

$$\frac{1}{x}+\frac{1}{y}=\frac{1}{13}$$

Given the sum of reciprocals of $(x,y)$, what's a method to find integer solutions for an equation similar to the above? I've been wondering and I haven't really found something online.

If you could point me to resources on stuff related to this, that would be greatly appreciated as well.

Best Answer

In general, you start by manipulating the equation as follows

$$\dfrac{1}{x}+\dfrac{1}{y} = \dfrac{1}{n}$$

$$nx+ny = xy$$

$$0 = xy-nx-ny$$

$$n^2 = xy-nx-ny+n^2$$

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

Then, all the solutions are of the form $(x,y) = (n+a,n+b)$ where $a$ and $b$ are complementary factors of $n^2$, i.e. $n^2 = ab$.

The idea to add $n^2$ to both sides in line 4 is known as Simon's Favorite Factoring Trick in case you are curious.

Related Question