# Criterion for sum/difference of unit fractions to be in lowest terms

Pick two nonzero integers $a$ and $b$, so $(a,b)\in (\mathbb{Z}\setminus\{0\})\times(\mathbb{Z}\setminus\{0\})$. We want to add the fractions $1/a$ and $1/b$ and use the standard algorithm. First carefully find the least common multiple of $a$ and $b$ (it is only well-defined up to a sign but that will not be important). Then convert each of the two fractions to get this common number as their denominators. Finally, add the two new numerators and keep the denominator.

For the scope of this question, let's call $(a,b)$ "easy" iff the resulting sum fraction is already in lowest terms (irreducible fraction).

Examples: If $a=12$ and $b=16$, then

$$\frac{1}{12}+\frac{1}{16}=\frac{4}{48}+\frac{3}{48}=\frac{7}{48}$$

so $(12,16)$ is "easy". On the other hand, since

$$\frac{1}{10}+\frac{1}{15}=\frac{3}{30}+\frac{2}{30}=\frac{5}{30}$$

the pair $(10,15)$ is not "easy".

The question: Is there an equivalent or simpler way to define this "easiness"? For example in terms of the signs and prime factorizations of $a$ and $b$? Does this property already have a conventional name?

Note that signs seem to matter since $(3,6)$ is not easy while $(3,-6)$ is.

• You aren't going to get much nicer than $\gcd(a+b,ab) = \gcd(a,b)$. – 6005 Jun 16 '13 at 14:08
• @vadim123 $a = b = 2$ is no counterexample. We get $4 \ne 2$, so $(2,2)$ is not easy, which is correct since $\frac22$ is not reduced. – 6005 Jun 16 '13 at 14:30
• I think Goos intended: “... much nicer than testing whether $\gcd(a+b,ab) = \gcd(a,b)$.” – Théophile Jun 16 '13 at 14:37

Let $\gcd(a,b)=d$, and write $a=da', b=db'$, where $\gcd(a',b')=1$. Then you have $$\frac{1}{a}+\frac{1}{b}=\frac{1}{da'}+\frac{1}{db'}=\frac{b'+a'}{da'b'}$$

Now, $\gcd(a'+b',a'b')=1$ because if prime $p|\gcd(a'+b',a'b')$ then $p|a'b'$ then wlog $p|a'$; but then $p|(a'+b')$ and hence $p|b'$, a contradiction. Hence the sum is "easy" exactly when $$\gcd(a'+b',d)=1$$

In the example $a=10, b=15$, we have $a'=2, b'=3, d=5$ and $a'+b'=5$.

In the example $a=3, b=\pm 6$, we have $a'=1, b'=\pm 2, d=3$, and $a'+b'$ is $3$ or $-1$.

• I think this should be the answer. It also tells you how to construct such pairs $(a, b)$. Pick any number $d$, and pick any pair of coprime numbers $a', b'$. If you want the pair $(a, b)$ to be "easy": make sure that $a' + b'$ is coprime to $d$; if you want it not to be, make sure $a' + b'$ has something in common with $d$. – ShreevatsaR Jun 16 '13 at 14:51
• Good explanation. If I multiply your equation $\gcd(a' + b',d)=1$ by $d$, I get the solution from the other answer. Note that this question was a duplicate, actually; I linked the other thread. – Jeppe Stig Nielsen Jun 16 '13 at 20:12

Two trivial conditions for easiness (which can serve as definitions) are $$\gcd(a + b, ab) = \gcd(a,b)$$ and $$\gcd(a + b, \gcd(a,b)^2) = \gcd(a,b)$$ At any rate, if you want it in terms of prime factorization and sign, you're probably going to have to use the prime factorization of $a + b$ and not just those of $a$ and $b$. This is true in a somewhat precise sense: permuting the primes does not preserve easiness on $(a,b)$. As an example, $(15,33)$ is easy while $(10, 22)$ is not (switching the primes $2$ and $3$).

• Even if you don't give many detalis on why your two conditions are correct, I can compare with vadim123's answer. Also, after reading your answer I found out this thread is really a duplicate (sorry), there's another thread When is the lcm of a fraction sum the actual denominator which asks the same, except with general numerators in the two fractions to add. And its answer gives the same formula as yours. I like your example with $(15,33)$ and $(10,22)$. When I think about it, it is reasonable that this depends also on the factors of $a+b$. – Jeppe Stig Nielsen Jun 16 '13 at 20:06