# Number of ways to sum two Egyptian fractions and satisfy a given inequality.

I am looking to finalize my solution to the following number theory problem:

Find a rule in terms of n for the number of ways to write integers a and b, with a less than or equal to b, so that $$\mathbf{1/a + 1/b = 1/n}$$ Specifically, I need help finding a rule for even integer values of n.

I began with some simple algebraic manipulation to find that $\mathbf{a = (nb/(b-n))}$ and then graphed the function using x for b and substituting various values of n, then looking for patterns in what values of y (a=y) were integer solutions and less than or equal to b. I first established that positive and negatives of the same integer value of n will always have the same number of ways to write a and b.

--When changing from n to -n the exact values of (b,a) follow a pattern: if (b,a) for n = (x,y), (b,a) for -n = (-y,-x)) For example the solution values of (b,a) for n=4 are:

• (20,5)
• (8,8)
• (3,-12)
• (2-4)
• (12,6)

and the solution values of (b,a) for n=-4 are:

• (-5,-20)
• (-8,-8)
• (12,-3)
• (4,-2)
• (-6,-12)

Knowing this, I chose to strictly test positive integer values of n because I would only have to plug in positive values of x into my table (using the equation $\mathbf{f(x) = nx/(x-n)}$) because any negative value of b that I plugged in would necessarily result in a positive value of a in order for $\mathbf{1/a + 1/b = 1/n}$ to remain true and that would violate the inequality a less than or equal to b.

I found the following rules:

• All $\mathbb {Z}$, excluding $1$ and $-1$, have the following three solutions:

$\mathbf{(b,a) = (n^2+n, n+1)}$

$\mathbf{(b,a) = (2n, 2n)}$

$\mathbf{(b,a) = (n-1, n-n^2)}$

• $N$ cannot equal 0

• If $\mathbf{abs. value (n)}$ = 1, there will be exactly one solution at $\mathbf{(b,a) = (2n, 2n)}$ The reason that 1 and -1 only have one solution is because neither a nor b can ever equal 0, which eliminates the first and third solutions listed above.

• If $\mathbf{GCD ((abs. value n), 2) = 1}$ the three solutions listed above are the only solutions, and so the rule follows that for all odd integer values of $n$ there are 3 ways.

I have not yet found a rule for when $\mathbf{GCD ((abs. value n), 2) = 2}$; that is what I am looking for help with. I collected the following data, I am just failing to see the pattern it presents:

For n = {2,4,6,8,10,12,14,16,18,20}, the number of solutions are {3,5,9,7,9,15,10,10,16,16}, respectively. The set of solutions is therefore also true for {-2,-4,-6,-8,-10,-12,-14,-16,-18,-20}, respectively. I'm hoping someone will see a pattern in this data, or will find a more efficient way to find the number of ways using less trial and error, because my process becomes increasingly more tedious as n grows larger (as I must test all x from 0 to $\mathbf{ n^2+n}$).

Note: for positive $\mathbf{n}, values of$\mathbf{b}, where $\mathbf{a = (nb/(b-n))}$, only exist on the interval $\mathbf{(0,n^2+n]}$

It may be worth restating that all even integers have the three solutions listed above, as well as some additional ones for which I have not found a rule.

It may also be interesting to note that solutions will occur when the above function is graphed and the function crosses through a lattice point on or above the line $y =x$.

• Hint: $\frac{1}{a} + \frac{1}{b} = \frac{1}{n}$ is equivalent to $(a-n)(b-n)=n^2$ so you just have to look at how many factorizations $n^2$ has. – Daniel Schepler Jul 27 '18 at 0:51
• Except for the case $a=b=0$, of course. – Daniel Schepler Jul 27 '18 at 0:54
• To add the above, the motivation is to clear the denominators because rarely is it ever helpful to have them in our structure. Then, we use "Simon's favorite factoring trick" or "completing the rectangle" to obtain information. – greenturtle3141 Jul 27 '18 at 0:55
• Also, note that for example $\frac{1}{24} + \frac{1}{40} = \frac{1}{15}$ which doesn't match your assertion for odd $n$. – Daniel Schepler Jul 27 '18 at 0:57
• Here's a good MathJax tutorial It's easy to get started; mostly just putting dollar signs around your math expressions. Another thing that really helps is, when you see a formula in someone else's writing that you wonder how he formatted, you can right-click on it, and pic "Show Math As...TeX Commands" from the pop-up to see how it was done. – saulspatz Jul 27 '18 at 1:58