# Diophantine equation $\frac{a+b}{c}+\frac{b+c}{a}+\frac{a+c}{b} = n$

Let $a,b,c$ and $n$ be natural numbers and $\gcd(a,b,c)=\gcd(\gcd(a,b),c)=1$.

Does it possible to find all tuples $(a,b,c,n)$ such that:

$$\frac{a+b}{c}+\frac{b+c}{a}+\frac{a+c}{b} = n?$$

• Hint fix a=1 to fix the gcd, if there are still infinite then obviously no. – shai horowitz Oct 13 '16 at 18:05
• @shaihorowitz $(1,1,1,6)$ and $(1,1,2,7)$ are solutions too. – Tzara_T'hong Oct 13 '16 at 18:05

A linear diophantine equation $$ax+by=c$$ where $c$ is divisible by $d=gcd(a,b)$, has solution $$a=a_{0}+\frac{b}{d}\cdot k$$ $$b=b_{0}-\frac{a}{d}\cdot k$$ However, your equation is not linear, since $$\frac{a+b}{c}+\frac{b+c}{a}+\frac{a+c}{b}=n$$ $$\frac{\left(a+b\right)ab+\left(b+c\right)bc+\left(a+c\right)ac}{abc}=n$$ Note here you are interested in combinations of $\left(a,b,c\right)$ such that this quotient is an integer $n$. Also, $$a^{2}b+ab^{2}+b^{2}c+bc^{2}+a^{2}c+ac^{2}=abcn$$ proves it's not possible to represent $\left(a,b,c\right)$ in the same terms of $k$ as a linear diophantine equation, so they don't share a straight-forward relationship, but this last equation is very interesting, since it is contained in the cubic expansion $\left(a+b+c\right)^{3}$.

Then, $$\left(a+b+c\right)^{3}=a^{3}+b^{3}+c^{3}+3\left(a^{2}b+ab^{2}+b^{2}c+bc^{2}+a^{2}c+ac^{2}\right)+6abc$$ $$\left(a+b+c\right)^{3}=a^{3}+b^{3}+c^{3}+3\left(abcn\right)+6abc$$ $$\left(a+b+c\right)^{3}=a^{3}+b^{3}+c^{3}+3abc\left(n+2\right)$$ $$\left(a+b+c\right)^{3}-\left(a^{3}+b^{3}+c^{3}\right)=3abc\left(n+2\right)$$ As you can see, this difference is divisible by 3, so using congruence is an excellent idea: $$\left(a+b+c\right)^{3}\equiv a^{3}+b^{3}+c^{3}\;\left(mod\;\;3\right)$$ So, given that $gcd\left(a,b,c\right)=1$, every combination of $\left(a,b,c\right)$ where the cube of the sum is congruent to the sum of the cubes $\left(mod\;\;3\right)$ is a possible answer.

For instance, $\left(1,1066,3977\right)$ and $\left(1,1598,4182\right)$ are valid answers, but it's difficult to trace an easy linear relation between $1$ and the other values.

First note that we can assume $a,b,c \in \mathbb{Q}$, without loss of generality. A rational solution can then be scaled to integers.

Combining into a single fraction gives the quadratic in $a$ \begin{equation*} a^2+\frac{b^2-nbc+c^2}{b+c}a+bc=0 \end{equation*} and, for rational solutions, the discriminant must be a rational square.

Thus, the quartic \begin{equation*} D^2=b^4-2(n+2)b^3c+(n^2-6)b^2c^2-2(n+2)bc^3+c^4 \end{equation*} must have rational solutions.

This quartic is birationally equivalent to the elliptic curve \begin{equation*} V^2=U^3+(n^2-12)U^2+16(n+3)U \end{equation*} with \begin{equation*} \frac{b}{c}=\frac{V+(n+2)U}{2(U-4(n+3))} \end{equation*}

The elliptic curve is singular when $n=-2,-3,6$. $n=6$, for example, corresponds to $a=b=c=K$ as a solution.

If $n \ne -2,-3,6$, the curve has $5$ finite torsion points at $(0,0)$, $(4,\pm 4(n+2))$ and $(4n+12,\pm 4(n+2)(n+3))$ none of which give a solution. For $n=7$, there are a further $6$ torsion points which lead to the solutions $(a,b,c)=(1,1,2)$ and $(a,b,c)=(1,2,2)$.

Thus, if $n \ne -3,-2,6,7$, we need the elliptic curve to have rank greater than zero to find a solution. Computations using the Birch and Swinnerton-Dyer conjecture suggest the first few solutions are with $n=8,11,12,15,\ldots$.

For example, the $n=15$ curve has a generator $(-36,468)$ which gives the solution $a=2, b=3, c=15$. As $n$ gets larger, the size of solutions generally increases.

We get $(a+b+c)(\frac{ab+bc+ca}{abc})=n+3$
Since $gcd(ab+bc+ca,abc)=1$ beacuse $(a,b,c)=1$ we should have $(a+b+c)\vdots (abc)$ and then we can get solutions $(1,1,1),(1,1,2),(1,2,3)$

• $gcd(ab+bc+ca,abc)=1$ is not true. $a=1,b=2, c=6.$ – Tzara_T'hong Oct 13 '16 at 18:51
• But then $gcd(6,2)\neq 1$. It is true because we can look at it as $gcd(ab+bc+ca,c)$ and others which is equivalent to $gcd(ab,c)=1$ – arberavdullahu Oct 13 '16 at 19:06
• By the condition of the problem we have $\gcd(a,b,c) = \gcd(\gcd(a,b),c)=1.$ – Tzara_T'hong Oct 13 '16 at 19:15
• Yeah but since they're equal can't we take just $gcd(a,b,c)=1$? – arberavdullahu Oct 13 '16 at 19:17
• If $gcd(a,b,c)=1$, then $gcd(ab+bc+ca,abc)=1$ is not true in general: $a=1,b=2, c=6$ for instance. – Tzara_T'hong Oct 13 '16 at 19:20

I'll describe one approach which refers toElliptic Curves.

First, denote $$p=\dfrac{a}{a+b+c}, \quad q=\dfrac{b}{a+b+c}, \quad r = \dfrac{c}{a+b+c}=1-p-q.\tag{1}$$

Then after adding $\dfrac{c}{c}+\dfrac{a}{a}+\dfrac{b}{b}=3$ to starting equation, we'll get $$\dfrac{1}{p}+\dfrac{1}{q} + \dfrac{1}{r} = n+3;\tag{2}$$ Then denote $$p=m-d,\quad q=m+d, \; \mbox{ where } |d|<m<1/2,$$ and $(2)\Rightarrow (3)$: $$\dfrac{1}{m-d}+\dfrac{1}{m+d}+\dfrac{1}{1-2m} = n+3;\tag{3}$$ $$\dfrac{2m(1-2m)+(m^2-d^2)}{(m^2-d^2)(1-2m)} = n+3;$$ after some transformations we'll get equation for $(m,d)$: $$(2(n+3)m-n-2)d^2 = 2(n+3)m^3-(n+6)m^2+2m.$$

Finally, denote $$m = \dfrac{(n+2)x+1}{2(n+3)x}, \quad d = \dfrac{y}{2(n+3)x};$$ after some simplifying we'll get equation for $(x,y)$: $$y^2 = 4(n+2)x^3 + n^2x^2+2nx+1.\tag{4}$$

Equation $(4)$ describes certain Elliptic Curve (EC).

Now,

• try to find a few starting rational points of EC (using brute force search, for example);
• applying the group law, find other (as much as possible) rational points of EC;
• finally, select such points only, for which $|m|<d<1/2$.

This method (and the structure of equation) is closely related to method of finding similar problem solutions.

Since we'll obtain huge integer numbers $a,b,c$ after few steps of walking along EC, I'll show reasonably large ones only:

\begin{array}{|c|c|} \hline n & a,b,c \\ \hline 6 & 1,1,1 \\ \hline 7 & 1,1,2 \\ & 1,2,2 \\ \hline 8 & 1,2,3 \\ & 2,3,6 \\ & 8177, 8874, 22243 \\ & 11322, 28379, 30798 \\ & 264668812593, 596917970819, 765759090202 \\ & 579432117963, 743327279754, 1676455216382 \\ & 76958469196744137591058, 134451734421662586058497, 233763322749706719184931 \\ & 140374393770070337430066, 244060702212707093922518, 426390819089416636962387 \\ & \ldots \\ \hline 11 & 2,3,10 \\ & 3,10,15 \\ & 129609938, 398619322, 665659395 \\ & 304406698, 508332555, 1563392295 \\ & 849823960453237978650627, 3053593877043831122496050, 4107252165654093769719898 \\ & 2249722029555895456095675, 3026000198480402499943863, 10873046781459417805417450 \\ & \ldots \\ \hline 12 & 1,2,6 \\ & 1,3,6 \\ & 201134, 841113, 1072474 \\ & 333459, 425182, 1778049 \\ & 13609929187686894, 57640720247049619, 71996401755236577 \\ & 17668312802572318, 22068685842562794, 93465214207141769 \\ & \ldots \\ \hline 15 & 2,3,15 \\ & 2,10,15 \\ & 952712343, 3044622267, 7974923330 \\ & 1475561727, 3865008730, 12351568370 \\ & \ldots \\ \hline 16 & ? \\ \hline 19 & ? \\ \hline 20 & ? \\ \hline 23 & 1,6,14 \\ & 3,7,42 \\ & 1621859337, 2014655278, 18651341318 \\ & 1975996071, 18293440851, 22723904794 \\ & \ldots \\ \hline 24 & ? \\ \hline 27 & 10, 77, 165 \\ & 14, 30, 231 \\ & 4430547232529081454, 36139386493080531486, 71649568303086464735 \\ & 7082090148273898842, 14040877586688470045, 114529577313119362405 \\ & \ldots \\ \hline 28 & ? \\ \hline 31 & 1,6,21 \\ & 2,7,42 \\ & 8878833, 17378998, 166742613 \\ & 9449986, 90667791, 177468746 \\ & 200321970145448798577, 2788507822582499346582, 2992032039624422248117 \\ & 747195060205269358914, 801730424379013131359, 11160191557421428133194 \\ & \ldots \\ \hline 32 & 3, 10, 65 \\ & 6, 39, 130 \\ & 1821365467193555, 20672336467139058, 33287283401295745 \\ & 7943231969284014, 12790456178192335, 145170542895601626 \\ & \ldots \\ \hline 35 & 90, 391, 2210 \\ & 207, 1170, 5083 \\ & 182127607562055810474624817130, 1320995230654532333162659755111, 4363962685714983855023196247570 \\ & 568734025435763596856102290167, 1878836507129847550250015042290, 13627445604327101620082253820563 \\ & \ldots \\ \hline 36 & ? \\ \hline 39 & 561, 6450, 13889 \\ & 1650, 3553, 40850 \\ & 19918302114889088017632015217487883650, 60569462602897456667888129359842887481, 531797592631412085961939529793102092169 \\ & 26353710650431538163999207644180706050, 231384583559667745287470357470008076450, 703616191780126367349950469574356131913 \\ & \ldots \end{array}

To check them, one can input in WolframAlpha text like this:

(a+b)/c+(a+c)/b+(b+c)/a where (a,b,c)=(304406698, 508332555, 1563392295)

Note 1. After $n=6$, I didn't find any $n$ of the form $n=4k+1$, $n=4k+2$, for which starting equation has solution(s).

Note 2. One can see that solutions are grouped by pairs: $$(a_1,b_1,c_1,n)\\(a_2,b_2,c_2,n).$$ And one can see that for such pairs (if denote $M=LCM(a_1,b_1,c_1)$): $$a_1c_2=b_1b_2 = c_1a_2 = LCM(a_1,b_1,c_1) = LCM(a_2,b_2,c_2) =M.$$ Indeed, if $(a_1,b_1,c_1,n)$ is solution of starting equation, then $$\dfrac{a_1+b_1+c_1}{a_1}+\dfrac{a_1+b_1+c_1}{b_1}+\dfrac{a_1+b_1+c_1}{c_1}=n+3,$$ $$(a_1+b_1+c_1)\left(\dfrac{1}{a_1}+\dfrac{1}{b_1}+\dfrac{1}{c_1}\right)=n+3,$$ $$(a_1+b_1+c_1)\left(\dfrac{M/a_1}{M}+\dfrac{M/b_1}{M}+\dfrac{M/c_1}{M}\right)=n+3,$$ $$(a_1+b_1+c_1)\dfrac{\left(M/a_1+M/b_1+M/c_1\right)}{M}=n+3,$$ $$(M/a_1+M/b_1+M/c_1)\left(\dfrac{a_1+b_1+c_1}{M}\right)=n+3,$$ hence $\left(M/a_1,M/b_1,M/c_1,n\right)$ is solution too.