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


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


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.

  • $\begingroup$ You aren't going to get much nicer than $\gcd(a+b,ab) = \gcd(a,b)$. $\endgroup$ Jun 16, 2013 at 14:08
  • 1
    $\begingroup$ @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. $\endgroup$ Jun 16, 2013 at 14:30
  • 1
    $\begingroup$ I think Goos intended: “... much nicer than testing whether $\gcd(a+b,ab) = \gcd(a,b)$.” $\endgroup$
    – Théophile
    Jun 16, 2013 at 14:37

2 Answers 2


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

  • $\begingroup$ 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$. $\endgroup$ Jun 16, 2013 at 14:51
  • $\begingroup$ 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. $\endgroup$ Jun 16, 2013 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$).

  • $\begingroup$ 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$. $\endgroup$ Jun 16, 2013 at 20:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .