# If $a$, $b$ and $n$ are positive integers such that $\frac{1}{a} + \frac{1}{b} = \frac{1}{n}$ then what is the total number of pair of $(a,b)$?

If $a$, $b$ and $n$ are positive integers such that $\frac{1}{a} + \frac{1}{b} = \frac{1}{n}$ then what is the total number of pair of $(a,b)$? What if $a$, $b$ and $n$ are not necessarily positive integers?

My attempt:- If $n$ is small, like

$$\frac{1}{a} + \frac{1}{b} = \frac{1}{5}$$

I just convert it to a suitable form like this

$$5a + 5b = ab$$

After this, I just try by hit and trial.

But I need a suitable method to solve these type of questions. I always get stuck on these for a long time.

The way you reduced it, is pretty much all you could do with problems like these. In general, we get $an+bn=ab$, so we get $ab+n^{2}-an-bn=n^{2}$, that is $(n-a)(n-b)=n^{2}$, now you could check all the factors of $n^{2}$ and manually try to find all $a,b$ that work.

If you solve further, you see that: $$b = \dfrac{na}{a-n}$$

Note that the fraction on the RHS, is only positive for $a>n$. It only suffices to find all integers $a$ such that $a-n|an$. This is trivial , by setting $a = (k+1)n$, where $k$ is any factor of $n$.This will give you the solution set.

The answer is infinitely many pairs.

Let $a = b$. Then, $$\frac{1}{a} + \frac{1}{b} = \frac{1}{a} + \frac{1}{a} = \frac{2}{a}$$

From which we get $n = \frac{a}{2}$. This gives $a = b = 2n$ as sufficient to fulfill the equation. Since the last equation is itself fulfilled by infinitely many different values of $a$, it follows that there are infinitely many pairs of $(a,b)$, even if $a$, $b$ and $n$ are not necessarily positive, and we haven't even looked at the cases where $a \neq b$.

As for your other question, I can't really help as I came across this by chance. I haven't taken a course on this topic so it just looks like trickery to me.

• How is $a = 2n$ satisfied for infinitely many $a$? For any given $n$, there is just one such $a$. – NickD Oct 15 '17 at 0:57
• If I missed something implicit, my bad, but I don't see a requirement for $n$ to be fixed in the question (except in the "my attempt" part) – alleks Oct 15 '17 at 1:05
• The question is: for any given $n$, how many pairs $(a, b)$ can you find such that $1/a + 1/b = 1/n$? Since $a, b, n$ are positive values, the number of pairs for any given $n$ is finite. – NickD Oct 16 '17 at 3:12