# Find all integral solutions to $a+b+c=abc$. [duplicate]

Find all integral solutions of the equation $a+b+c=abc$.

Is $\{a,b,c\}=\{1,2,3\}$ the only solution? I've tried by taking $a,b,c=1,2,3$.

• What about $0,1,-1$? Mar 5, 2015 at 17:11
• Is this a special case for ABC conjecture
– user210387
Mar 5, 2015 at 17:35
• This is directly related to perfect numbers.
– AvZ
Mar 6, 2015 at 8:45
• – hola
Dec 15, 2021 at 17:55

If at least one of $a,b,c$ is $0$ (i.e. $abc=0$), then $(a,b,c)$ satisfies the equation iff $\{a,b,c\}=\{t,-t,0\}$ for some $t\in\mathbb Z$.

Let $abc\neq 0$.

If WLOG $a=b$, then $(ca-1)^2=c^2+1\iff c=0$, but $abc\neq 0$, contradiction.
(or simply observe: $2a+c=a^2c\iff a^2c-2a-c=0, \Delta=4+4c^2=k^2, k\in\mathbb Z$
$\,\Rightarrow\, c^2+1=l^2, l\in\mathbb Z\iff c=0$, contradicting $abc\neq 0$).

If WLOG $a=-b$, then $c=-a^2c\iff c=0$, contradicting $abc\neq 0$.

Let WLOG $|a|>|b|>|c|>0$.

$$|abc|=|a||bc|=|a+b+c|\stackrel{\text{Triangle ineq.}}\le |a|+|b|+|c|< 3|a|$$

$$\iff |a|(|bc|-3)< 0$$

$|a|>0$, so $|bc|< 3$, and $(b,c)\in\{(2,1),(2,-1),(-2,1),(-2,-1)\}$.

Checking all of these only gives the solutions $(a,b,c)=(1,2,3),(-3,-2,-1)$.

Answer: $\{a,b,c\}=\{1,2,3\},\{-1,-2,-3\},\{t,-t,0\}$ for any $t\in\mathbb Z$.

Note that if $a\ge b \ge c\ge 2$ you have $$3a\ge a+b+c=abc \ge 4a$$So for solutions with $a\ge b \ge c \ge 0$ you have $c=0$ or $c=1$

$c=0$ gives $a+b=0$, or $a=-b$. A non-negative solution has $a=b=0$. Note also the general solution $r, -r, 0$

$c=1$ gives $a+b+1=ab$ which can be rewritten $(a-1)(b-1)=2$ so $a=3, b=2$. We see also the solution $a=0, b=-1, c=1$ given by the factorisation of $2$ into negative factors.

Changing all the signs in a known solution gives another solution, so we can assume $abc\ge 0$, and we can also now assume that none of the numbers is $0$ or $1$.

Our computation for $1$ therefore gives the solutions for $-1$ too just by changing signs.

To test for further solutions we can change signs and choose $abc\gt 0$ with $a\gt 0\gt-2\ge b\ge c$. But then the inequalities at the top of this answer both hold, and there are no additional solutions.

We find all solutions by applying the symmetries of permuting values or sign change to the solutions already found.

The solutions with $abc=0$ obviously are of form $0,b,-b$. And since $a,b,c$ is a solution iff $-a,-b,-c$ is, we find all solutions with $abc\neq 0$ by finding all with $abc>0$. We show the only such solution is $1,2,3$.

If $abc>0$ then at least one of $a,b,c$ is $>0$ and the other two are alike in sign. But if that sign was negative then the sum would be less than the greatest of $a,b,c$ while the product would be greater, so this would not give a solution. So if $abc>0$ then $a,b,c$ are each $>0$.

If $a=b$, apply the quadratic formula to find $a$ in the equation $2a+c=a^2c$. You find $a$ is a positive integer iff $c=0$ which is a case we already know.

So we can assume $0<a<b<c$.

For fixed $0<a<b$ consider $$f_{ab}(c) = abc - a-b-c=(ab-1)c-(a+b)$$ as a linear function of $c$. We want an integer solution $f_{ab}(c)=0$ with $c>2$. The slope of $f_{ab}$ is $ab-1$ which is $>0$, so there is at most one $c$, and indeed for $a=1,b=2$ there is the known solution $c=3$. When $a=1$ and $b>2$ the smallest value of $c$ we need consider is $c=b+1$. For that value of $c$ the function is already strictly positive and since it has positive slope there is no solution with any greater value of $c$.

When $a>1$ then again $b>2$, the smallest value of $c$ we need consider is $c=b+1$ and for that value of $c$ the function is already strictly positive and since it has positive slope there is no solution.

• I don't understand the end of your first paragraph. If $\text{max}(a,b,c)$ is greater than zero, why is it necessary that all three of them are greater than zero?
– Ryan
Mar 6, 2015 at 8:08
• @Ryan I have split that paragraph so the now-second one answers your question. Mar 6, 2015 at 8:44
• Ah, I see now. Thanks!
– Ryan
Mar 6, 2015 at 17:35

Of course, if one of $a,b,c$ are zero, then you can only have $\{a,b,c\}=\{0,k,-k\}$ for some integer $k$. So suppose none of $a,b,c$ are zero. Since $a,b,c$ satisfies $a+b+c=abc$ if and only if $-a,-b,-c$ satisfies $a+b+c=abc$, we can assume that either exactly one of $a,b,c$ is negative or none are negative.

Now dividing $a+b+c=abc$ by $abc$ results in the equation $$\frac{1}{bc}+\frac{1}{ac}+\frac{1}{ab}=1.$$

• If one of $a,b,c$ are negative, so say $a<0$, (and so $b,c\geq 1$) then we have $\frac{1}{bc}\leq 1< 1-\frac{1}{ab}-\frac{1}{ac}=\frac{1}{bc}$, an impossibility.

• If $a,b,c>0$, then at least one of $ab, ac$ or $bc$ is at most $3$, and all are greater than $1$. Without loss of generality, we can say $1<ab\leq 3$. This can only be the case if $a,b\in \{1,2,3\}$, with exactly one of them equal to $1$. So say $a=1$. Hence $1+b+c=bc$ with $b=2$ or $b=3$. If $b=2$ we get $c=3$; if $b=3$, then $c=2$.

In summary, the integral solutions of $a+b+c=abc$ are $\{0,k,-k\}$ for any integer $k$, and $\{1,2,3\}$ and $\{-1,-2,-3\}$.

This feels a little clunky, but here goes.

Let's start by looking for positive integer solutions ordered $0\lt a\lt b\lt c$.

If we set $a=1$, the equation $1+b+c=bc$ can be rewritten as

$$(b-1)+2=(b-1)c$$

which implies $b-1$ divides $2$. This leads quickly to the known solution $(a,b,c)=(1,2,3)$.

If $a\gt1$, let's write $b=ar+d$ and $c=as-e$ with $s\gt r\ge1$ and $0\le d,e\lt a$. (It will soon become clear why we choose to write $b$ and $c$ this way.) Substituting these in, we find

$$a(1+r+s)+(d-e)=a(ar+d)(as-e)$$

which implies $a$ divides $d-e$. But since $0\le d,e\lt a$, this happens if and only if $d=e$, so the equation now becomes

$$1+r+s=a^2rs+ad(s-r)-d^2$$

But from the various inequalities, we have

\begin{align} 1+r+s&\le 2s\\ &\le2s+2(s-2)\\ &=4(s-1)\\ &\le a^2(rs-1)\\ &\lt a^2rs+ad(s-r)-d^2 \end{align}

The final strict inequality, which comes from $0\le d\lt a$, gives a contradiction, which implies there are no positive integer solutions with $1\lt a\lt b\lt c$.

Let's now consider the possibility that two variables are equal. By symmetry, we may as well assume $b=c$. In this case the equation becomes

$$a+2b=ab^2$$

This implies $b$ divides $a$, so writing $a=bk$ leads to

$$k+2=kb^2$$

which implies $k$ divides $2$. The two (positive) possibilities for $k$ each lead to a contradiction. Thus $(a,b,c)=(1,2,3)$ is the only solution with $0\lt a\le b\le c$.

As for solutions with non-positive integers, symmetry allows us to look for solutions with $a\le b\le0\le c$. (I.e., if $(a,b,c)$ is a solution, then so is $(-a,-b,-c)$ and its permutations.) If $b=0$, we have $a+c=0$, so we get solutions of the form $(-c,0,c)$. If $b\lt0$, then we get the contradiction $abc\ge c\ge0\gt c+(a+b)$.

Well if you are asking about only integral solutions then there are infinitely many because we can take any positive number $\times$ then its additive inverse and zero will always add up to zero and their product will also be zero. Few examples are: $$0+(-2)+2=0×(-2)×2=0$$ $$0+(-3)+3=0×(-3)×3=0$$ and so on

a+b+c=abc then first of all (a+b+c)>=3*(abc)^1/2 so (abc)^2>=9abc so abc>=9 which shows that a+b+c>=9 which is strictly impossible to satisfy for integer. Other way is to think that first of all 0 being obvious solution and for other solution let a+c=0 then b=-aab Which again gives 0 as the only solution a+b+c=abc (1/ab)+(1/bc)+(1/ca)=1 which is only possible for ab=2,bc=3,ca=6 which again yields no solutions.I mean different solutions i.e another equal to b & so on.

• If you are trying to apply AM/GM inequality then your exponent needs to be $\frac 13$ Mar 6, 2015 at 9:26
• Sorry I am just like that. Mar 6, 2015 at 11:15

If you are looking for a general solution (not necessarily restricted to integers), here is one $$(\tan \theta_1, \tan \theta_2, \tan \theta_3)$$ where $$\theta_1+\theta_2+\theta_3=\pi$$.