# Solve: $ab+bc+ca\mid (a+b+c)^2$

I couldn't make any progress on this problem, can anyone help?

I found it's the same as: Find all integers $a,b,c$ such that $ab+bc+ca$ divides $a^2+b^2+c^2$.

I found a solution $a=-b=1$, and $c$ any integer.

Any more solutions?

• @amWhy but are equivalent. Feb 9, 2015 at 15:21
• Yes, many more solutions: $(a,a,a)$, $(0,b,b)$, or $(a,-a,c)$ with $a\mid c$, etc. Feb 9, 2015 at 15:33
• It might be interesting to look for cases with $a,b,c>0$ and $\gcd(a,b,c)=1$ Feb 9, 2015 at 15:38
• As for the equivalent statement, use $a^2+b^2+c^2=(a+b+c)^2-2(ab+bc+ca)$. Feb 9, 2015 at 15:43

Did not notice this question. The diophantine equation $$x^2 + y^2 + z^2 = B (yz + zx + xy)$$ has integer solutions $(x,y,z)$ not all equal to zero (and allowed negative)), if any only if we may express both $$B-1 = u_1^2 + 3 v_1^2,$$ $$B+2 = u_2^2 + 3 v_2^2$$ all in integers. The values that work are $$B = 1,2,5,10, 14,...$$

See

examples for $B = 5,10,14.$ For $B = 5$ we take the three values $$( 5 u^2 + 9 uv + 3 v^2, 3 u^2 -3 uv - v^2, - u^2 + uv + 5 v^2 ).$$ Next, take the triple in decreasing absolute value. Finally, if the first one is negative, negate all three. The result is a list that is not too repetitive, with $x \geq y \geq |z|,$ because $y$ turns out to be positive in this recipe. Sometimes $z$ is also positive, not often. Oh, nice rule, we get to take $u,v \geq 0.$

 ./isotropy_binaries_combined 1 5 300 | sort -n
x      y      z                       u  v
5      3     -1      < 5, 9, 3 >      1  0
17      5     -1      < 5, 9, 3 >      1  1
41      5      3      < 5, 9, 3 >      2  1
59     47    -15      < 5, 9, 3 >      1  3
75     17     -1      < 5, 9, 3 >      3  1
89     83    -25      < 5, 9, 3 >      1  4
101     47    -15      < 5, 9, 3 >      2  3
111     17      5      < 5, 9, 3 >      3  2
129    125    -37      < 5, 9, 3 >      1  5
173     59    -15      < 5, 9, 3 >      5  1
185    131    -43      < 5, 9, 3 >      2  5
185    167    -51      < 5, 9, 3 >      1  6
201     83    -25      < 5, 9, 3 >      3  4
215     41      3      < 5, 9, 3 >      4  3
227     41      5      < 5, 9, 3 >      5  2
237     89    -25      < 5, 9, 3 >      6  1
251    215    -67      < 5, 9, 3 >      1  7
255    131    -43      < 5, 9, 3 >      3  5
293    255    -79      < 5, 9, 3 >      2  7
x      y      z                       u  v


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

For $B=10,$ we take $$( 5 u^2 + 8 uv + 2 v^2, 2 u^2 -4 uv - v^2, - u^2 + 2 uv + 5 v^2 ).$$

 ./isotropy_binaries_combined 1 10 300 | sort -n
x      y      z                       u  v
5      2     -1      < 5, 8, 2 >      1  0
29     23    -10      < 5, 8, 2 >      1  2
38      5     -1      < 5, 8, 2 >      2  1
50     47    -19      < 5, 8, 2 >      1  3
71      5      2      < 5, 8, 2 >      3  1
86     53    -25      < 5, 8, 2 >      2  3
101     23    -10      < 5, 8, 2 >      3  2
134     95    -43      < 5, 8, 2 >      1  5
167     29    -10      < 5, 8, 2 >      5  1
173     95    -46      < 5, 8, 2 >      3  4
191    125    -58      < 5, 8, 2 >      1  6
194     53    -25      < 5, 8, 2 >      4  3
215    146    -67      < 5, 8, 2 >      3  5
230     47    -19      < 5, 8, 2 >      6  1
263     50    -19      < 5, 8, 2 >      5  3
269    230    -97      < 5, 8, 2 >      2  7
290    149    -73      < 5, 8, 2 >      4  5
x      y      z                       u  v


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

For $B=14,$ we take $$( 3 u^2 + 6 uv + 2 v^2, 2 u^2 -2 uv - v^2, - u^2 + 3 v^2 ).$$ No $uv$ term in the third form. Go Figure.

 ./isotropy_binaries_combined 1 14 300 | sort -n
x      y      z                       u  v
3      2     -1      < 3, 6, 2 >      1  0
11      2     -1      < 3, 6, 2 >      1  1
23     11     -6      < 3, 6, 2 >      1  2
26      3     -1      < 3, 6, 2 >      2  1
47     11     -6      < 3, 6, 2 >      3  1
59     47    -22      < 3, 6, 2 >      1  4
66     23    -13      < 3, 6, 2 >      2  3
71      3      2      < 3, 6, 2 >      3  2
74     23    -13      < 3, 6, 2 >      4  1
83     74    -33      < 3, 6, 2 >      1  5
107     39    -22      < 3, 6, 2 >      5  1
111    107    -46      < 3, 6, 2 >      1  6
122     71    -37      < 3, 6, 2 >      2  5
131     39    -22      < 3, 6, 2 >      3  4
138     11     -1      < 3, 6, 2 >      4  3
146    143    -61      < 3, 6, 2 >      1  7
146     59    -33      < 3, 6, 2 >      6  1
167     66    -37      < 3, 6, 2 >      3  5
183     11      2      < 3, 6, 2 >      5  3
191    179    -78      < 3, 6, 2 >      1  8
191     83    -46      < 3, 6, 2 >      7  1
194    143    -69      < 3, 6, 2 >      2  7
218     59    -33      < 3, 6, 2 >      4  5
227     23     -6      < 3, 6, 2 >      5  4
239     66    -37      < 3, 6, 2 >      7  2
242    111    -61      < 3, 6, 2 >      8  1
242    219    -97      < 3, 6, 2 >      1  9
251    138    -73      < 3, 6, 2 >      3  7
282    239   -109      < 3, 6, 2 >      2  9
291     47    -22      < 3, 6, 2 >      7  3
299    183    -94      < 3, 6, 2 >      3  8
299    263   -118      < 3, 6, 2 >      1  10
x      y      z                       u  v


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

For $B = 29$ we need two parametrizations;

$$( 23 u^2 + 49 u v + 17 v^2, 17 u^2 -15 u v -9 v^2, -9 u^2 -3 u v + 23 v^2)$$

$$( 27 u^2 + 45 u v + 11 v^2, 11 u^2 -23 u v -7 v^2, -7 u^2 + 9 u v + 27 v^2)$$

 ./isotropy_binaries_combined 1 29 1111 | sort -n
x      y      z                          u  v
23     17     -9      < 23, 49, 17 >      1  0
27     11     -7      < 27, 45, 11 >      1  0
83     29    -19      < 27, 45, 11 >      1  1
89     11     -7      < 23, 49, 17 >      1  1
207     29    -19      < 23, 49, 17 >      2  1
209     17     -9      < 27, 45, 11 >      2  1
263    261   -121      < 27, 45, 11 >      1  3
323    189   -109      < 23, 49, 17 >      1  3
371     99    -67      < 23, 49, 17 >      3  1
389     23     -9      < 27, 45, 11 >      3  1
461    383   -193      < 27, 45, 11 >      1  4
477    269   -157      < 27, 45, 11 >      2  3
491    347   -187      < 23, 49, 17 >      1  4
539    153   -103      < 23, 49, 17 >      2  3
557     99    -67      < 27, 45, 11 >      3  2
569     27     -7      < 23, 49, 17 >      3  2
693    551   -283      < 23, 49, 17 >      1  5
833    737   -361      < 27, 45, 11 >      2  5
911    153   -103      < 27, 45, 11 >      5  1
929    801   -397      < 23, 49, 17 >      1  6
959    477   -289      < 27, 45, 11 >      3  4
1007    509   -307      < 23, 49, 17 >      2  5
1019    693   -379      < 27, 45, 11 >      1  6
1067    251   -171      < 23, 49, 17 >      3  4
1071    239   -163      < 27, 45, 11 >      4  3
1109     27     11      < 23, 49, 17 >      4  3
x      y      z                          u  v

• Could you please provide a reference for why $B-1$ and $B+2$ must be of the form $x^2+3y^2$? Oct 19, 2015 at 0:52
• @Batominovski, it is my result, but is equivalent to the famous result of Legendre on indefinite ternary forms, math.stackexchange.com/questions/27471/… or pages 80-82 in Rational Quadratic Forms by Cassels, store.doverpublications.com/0486466701.html I also wrote up a twenty page article (well, not to publish) about this problem, i could send you a pdf. Oct 19, 2015 at 1:04
• @Batominovski, sent. If you don't see anything, email me so I can reply with the pdf (my address in my profile). In any case, it is usual to delete comments with email addresses after successful use. I have not had any real problems with my address public, just some occasional individuals, no bots. Oct 20, 2015 at 18:36
• Thanks a bunch. I received the file. Oct 21, 2015 at 13:00
• @WillJagy: Hi, thanks for this informative answer. If it isn't too much trouble, I too am interested in the pdf regarding the result at the beginning. My email is: [email protected] Thank you Oct 25, 2015 at 4:47

Yes, there are lots of solutions. These are the ones with $f<g<h\le102$ and $\gcd(f,g,h)=1$. $${1,4,9}\\ {1,9,16}\\ {1,25,36}\\ {1,36,49}\\ {1,49,64}\\ {1,64,81}\\ {1,81,100}\\ {2,3,71}\\ {2,5,71}\\ {3,5,41}\\ {4,9,25}\\ {4,25,49}\\ {4,49,81}\\ {9,16,49}\\ {9,25,64}\\ {9,49,100}\\ {16,25,81}$$ Mathematica code used:

fmax = 100;
Do[
If[GCD[f, g, h] != 1, Continue[]];
If[Mod[f^2 + g^2 + h^2, f g + g h + h f] == 0, Print[{f, g, h}]],
{f, fmax}, {g, f + 1, fmax + 1}, {h, g + 1, fmax + 2}
]

• Hello, thank you for this. Can I ask which code did you use? Thanks! Feb 9, 2015 at 16:50
• I have included the code in the answer. Feb 9, 2015 at 16:55
• Hello again, I have figured how to make the code print $\frac{fg+gh+hf}{f^2+g^2+h^2}$. But how can I make it to print only distinct fractions? There are too many $\frac{1}{2}$. Thank you very much Sir. Feb 9, 2015 at 18:08
• You can save the quotient in a list. Every time a new solution is found check if the quotient is in the list. If it is, Continue[]. If not, print it and add it to the list. Feb 9, 2015 at 18:12
• Sorry, I do not know how to use code, I am a complete beginner. If you show me the new one I will accept your answer, because it is exactly what I need (when I thought about it). Feb 9, 2015 at 18:14

Since $(a+b+c)^2 = 2(ab+ac+bc)+(a^2+b^2+c^2)$, if $$(a+b+c)^2 = k(ab+ac+bc), \tag{1}$$ then $k\geq 2$, and for $k=2$ we have only the trivial solution $(a,b,c)=(0,0,0)$.

Assuming $k=3$, we have: $$a^2+b^2+c^2 = ab+ac+bc \tag{2}$$ and by the Cauchy-Schwarz inequality $(2)$ holds only for $a=b=c$.

Assuming $k=4$ we have the parametric solution: $$(a,b,c) = (m^2,n^2,(n+m)^2) \tag{3}$$ so there are plenty of solutions, and even more can be computed by Vieta jumping.

Markov triples are deeply related.

• +1 Also for a fixed $k$ we should get (when solutions exist) a rational parametrization in the style of parametrization of Pythagorean triples. After all, we have a curve of genus zero. Feb 9, 2015 at 18:05

For such equations:

$$(a+b+c)^2=-t^2(ab+ac+bc)$$

$t$ - you can specify any, then decisions can be recorded.

$$a=p^2-2(t^2+t+2)ps+(2t^3+t^2+4t+4)s^2$$

$$b=-p^2+2(t^2-t+2)ps+(2t^3-t^2+4t-4)s^2$$

$$c=t(p^2-(t^2+4)s^2)$$

$p,s$ - integers asked us.