Find all triples $(a,b,c)$ of positive integers such that $a^2+b+c=abc$. (bounding argument)

contest-mathelementary-number-theory

Find all triples $(a,b,c)$ of positive integers such that $a^2+b+c=abc$.

I am learning about bounding methods in number theory to solve Diophantine equations and there should be one considering this case.

I started with writing $$b+c=abc-a^2=a(bc-a).$$ Now the suspection is that the rhs will grow much quicker than the lhs and we also cannot have that $a > bc$ since that would make $bc-a<0$ and the lhs is positive.

So we know $1\le a\le bc-1$.

Now I'm hitting a dead end. How does the usual argument with bounding in these type of problems go? I would like to reduce this to the case where I only have finitely many cases to go through by considering the growth of the rhs.

Best Answer

You've made a good start to get that

$$b + c = a(bc - a) \tag{1}\label{eq1A}$$

Due to $a$, $b$ and $c$ being positive integers, we have $a \ge 1$ and $bc - a \ge 1$. Also, as Denis Shatrov's comment indicates, either $a \ge \frac{bc}{2}$, or $a \lt \frac{bc}{2} \;\to\; -a \gt -\frac{bc}{2} \;\to\; bc - a \gt \frac{bc}{2}$. Thus, both cases lead to

$$\begin{equation}\begin{aligned} b + c & \ge \frac{bc}{2} \\ 2b + 2c & \ge bc \\ 4 & \ge bc - 2b - 2c + 4 \\ 4 & \ge (b - 2)(c - 2) \end{aligned}\end{equation}\tag{2}\label{eq2A}$$

Due to symmetry with $b$ and $c$, WLOG consider $b \le c$. Thus, \eqref{eq2A} shows we only need to consider $1 \le b \le 4$. With $b = 4$, then $c = 4$ is the only possibility, but we then get $a^2 + 8 = 16a \;\to\; a^2 - 16a + 64 = 64 - 8 \;\to\; (a - 8)^2 = 56$, which is not possible for $a$ being an integer. Thus, we only need to consider $1 \le b \le 3$. Next, treat the original equation as a quadratic in $a$ to get

$$a^2 - (bc)a + (b + c) = 0 \;\;\to\;\; a = \frac{bc \pm \sqrt{(bc)^2-4(b+c)}}{2} \tag{3}\label{eq3A}$$

The discriminant must be a perfect square, so there's a non-negative integer $d$ such that

$$\begin{equation}\begin{aligned} b^2c^2 - 4b - 4c & = d^2 \\ b^4c^2 - 4b^3 - 4b^2c & = b^2d^2 \\ (b^2)^2c^2 - 4b^2c + 4 - 4 - 4b^3 & = (bd)^2 \\ (b^2c - 2)^2 - 4(b^3 + 1) & = (bd)^2 \\ (b^2c - 2)^2 - (bd)^2 & = 4(b^3 + 1) \\ (b^2c - 2 + bd)(b^2c - 2 - bd) & = 4(b^3 + 1) \end{aligned}\end{equation}\tag{4}\label{eq4A}$$

Consider each of the $3$ cases of $b$ from $1$ to $3$.

Case #$1$:

We get from $b = 1$ that

$$(c - 2 + d)(c - 2 - d) = 8 \tag{5}\label{eq5A}$$

Since $d = 0$ has $(c-2)^2 = 8$, we need $d \gt 0$, so $c - 2 + d \ge 0$. Thus, both LHS factors must be positive. As they have the same parity, they are also both even. Because the first factor is larger, we therefore must have $c - 2 + d = 4$ and $c - 2 - d = 2$, so adding these gives $2(c-2) = 6 \;\to\; c - 2 = 3 \;\to\; c = 5$, so then $d = 1$. Using this in \eqref{eq3A}, then $a = \frac{5 \pm 1}{2}$, so $a = 2$ or $a = 3$.

Case #$2$:

Using $b = 2$ in \eqref{eq4A} gives

$$(4c - 2 + 2d)(4c - 2 - 2d) = 4(9) = 36 \tag{6}\label{eq6A}$$

Once possibility is that $d = 0$ which gives $4c - 2 = 6 \;\to\; c = 2$. From \eqref{eq3A}, we then get that $a = 2$ also. Otherwise, for $d \gt 0$, since both LHS factors are even, with the first one being larger, the only possibility is that $4c - 2 + 2d = 18$ and $4c - 2 - 2d = 2$. Adding these gives $8c - 4 = 20 \;\to\; c = 3$, so then $d = 4$. Thus, from \eqref{eq3A}, $a = \frac{6 \pm 4}{2}$, so $a = 1$ or $a = 5$.

Case #$3$:

From \eqref{eq4A} with $b = 3$,

$$(9c - 2 + 3d)(9c - 2 - 3d) = 4(28) = (2^4)(7) \tag{7}\label{eq7A}$$

Since we're only considering where $c \ge b$, this means that $9c - 2 + 3d \ge 9(3) - 2 + 3(1) = 28$. As both factors must be even, there are only $2$ cases. First, $9c - 2 + 3d = 28$ and $9c - 2 - 3d = 4$ to get that $18c - 4 = 32 \;\to\; c = 2$, so this is not allowed (actually, this case was handled earlier where $b = 2$ and $c = 3$). Second, $9c - 2 + 3d = 56$ and $9c - 2 - 3d = 2$, which gives that $18c - 4 = 58 \;\to\; c = \frac{31}{9}$, which is not an integer. Thus, this case has no additional solutions.


In summary, the only positive integer solutions are $(a,b,c) \in \{(2,1,5), (2,5,1), (3,1,5), (3,5,1), (2,2,2), (1,2,3), (1,3,2), (5,2,3), (5,3,2)\}$.