1

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.

Bill Dubuque
  • 272,048
  • I remember having solved $a+b\mid ab$ (which is equivalent) and all solutions are $(a,b)=(\alpha(\alpha+\beta)\gamma,\beta(\alpha+\beta)\gamma)$ for some $\alpha,\beta,\gamma\in\mathbb{Z}$. If you'd like, I might try to reconstruct that, but I'm not sure if this is what you're looking for –  Mar 21 '18 at 13:08
  • Also, here's a related post –  Mar 21 '18 at 13:11
  • @vrugtehagel I saw the "related post". Anyway, yes, I'd be glad if you wish to recontruct that. – tomtomtom Mar 21 '18 at 13:24
  • Just an additional question, is $\text{gcd}(a,b) \leq 2$ always? I think I just found this – tomtomtom Mar 21 '18 at 13:28
  • @mathwizard1 Nope, $\frac1{8}=\frac1{16}+\frac1{16}$ – Mastrem Mar 21 '18 at 13:29
  • @Mastrem Yeah yeah, I missed out certain stuff while creating the equations. I got that – tomtomtom Mar 21 '18 at 13:32
  • If $\gcd(a,n)=1$, then all solutions are of the form $\alpha(\alpha+\beta),\beta(\alpha+\beta)$ with $\alpha\beta=n$ – Mastrem Mar 21 '18 at 13:52
  • I like how I've already stated the solutions but everyone keeps re-stating weaker versions. –  Mar 21 '18 at 13:52
  • @vrugtehagel You didn't state for what $\alpha,\beta,\gamma$ it works. For instance, I believe you need $\alpha\beta\gamma=n$ – Mastrem Mar 21 '18 at 13:56
  • I said $\alpha,\beta,\gamma\in\mathbb{Z}$. All choices for those three lead to solutions to $a+b\mid ab$. It's not that hard to plug them into the equation to find out what constraints we need for a given $n$. –  Mar 21 '18 at 13:59

1 Answers1

1

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$.