Solutions to $\frac{1}{n} = \frac{1}{a} + \frac{1}{b}$

159 Views Asked by At

Find all possible solutions to $\frac{1}{n} = \frac{1}{a} + \frac{1}{b}$ for a given $n$.

This is a famous and a pretty common problem. What we do here is- first observe that both $a,b > n$ and then a bit of manipulation breaks the problems into $(a-n)(b-n) = n^2$ and then we can find that there will be a total of $\tau(n^2)$ (ordered) solutions. Right?

Is there any other way to solve this? I just found this question quite good and found a few properties regarding it.

1

There are 1 best solutions below

0
On BEST ANSWER

Okay so, let's solve $a+b\mid ab$. First, set $d=\gcd(a,b)$ and set $a=da'$ and $b=db'$. Also see that $a+b\mid ab-a(a+b)$ so that $a+b\mid a^2$, and similarly $a+b\mid b^2$.

Now, set $k$ and $l$ so that $d(a'+b')k=(a+b)k=a^2=d^2a'$ and $d(a'+b')l=d^2b'$. This means $(a'+b')k=da'$ and $(a'+b')l=db'$. Since $a'$ doesn't divide $a'+b'$, it divides $k$; set $k=k'a'$, and similarly, set $l=l'b'$. This transforms both equations to $(a'+b')k'=d$ and $(a'+b')l'=d$, hence, $k'=l'$; so, (let's set $k'=n=l'$ to avoid confusion) we have $(a'+b')n=d$. So, $a'+b'$ divides $d$. Now we may pick $a'$, $b'$ and $n$, we obtain $d=(a'+b')n$, hence $a=da'=(a'+b')na'$ and $b=db'=(a'+b')nb'$. This means all solutions are given by

$$(a,b)=(\alpha(\alpha+\beta)\gamma,\beta(\alpha+\beta)\gamma)$$

for any $\alpha,\beta,\gamma\in\mathbb{Z}$. Now plugging that into the equation gives

\begin{align} \frac1a+\frac1b&=\frac1{\alpha(\alpha+\beta)\gamma}+\frac1{\beta(\alpha+\beta)\gamma}\\ &=\frac{\beta}{\alpha\beta(\alpha+\beta)\gamma}+\frac{\alpha}{\alpha\beta(\alpha+\beta)\gamma}\\ &=\frac{\alpha+\beta}{\alpha\beta(\alpha+\beta)\gamma}\\ &=\frac{1}{\alpha\beta\gamma}\\ \end{align}

so that we have $n=\alpha\beta\gamma$. In the end, if we're given an $n$, we simply have to write it as a product of three other numbers (note that they may also be negative) to find solutions to $a$ and $b$.