Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I find all $(a,b,c) \in \mathbb{Z}^3$ such that $a^2+b^2+ab$, $a^2+c^2+ac$ and $b^2+c^2+bc$ are squares ?

Thanks !

share|cite|improve this question

I have shown here that:

All coprime triples $(a,b,c)$ so that $a^2 + ab + b^2 = c^2$ can be enumerated, without duplication, by taking two positive integers $m \ge n$, where $3$ does not divide $n$, and either $mn$ is odd and $\gcd(m,n) = 1$, or $8$ divides $mn$ and $\gcd(m,n) = 2$, and by setting $$ \begin{align} a&=mn\tag{1a}\\[9pt] b&=\frac{(3m+n)(m-n)}{4}\tag{1b}\\[9pt] c&=\frac{3m^2+n^2}{4}\tag{1c} \end{align} $$

share|cite|improve this answer
Seriously, $>=$? What happened to $\geq$, or $\geqslant$? :-) – Asaf Karagila Jul 5 '12 at 20:21
@AsafKaragila: So, I missed that in the translation from ASCII :-p – robjohn Jul 5 '12 at 20:42
Quite the husky translation, I'd say! – Asaf Karagila Jul 5 '12 at 20:45

Let $c^2+a^2+ca= (c+na)^2$ where $n$ is an integer $\implies a=\frac{(2n-1)c}{1-n^2}$.

Let $a^2+b^2+ab =(a+mb)^2$ where $m$ is an integer $\implies b=\frac{(2m-1)a}{1-m^2}=\frac{(2n-1)(2m-1)}{(1-n^2)(1-m^2)}c$.

If $c|(1-n^2)(1-m^2)$,

$c=r(1-n^2)(1-m^2)$ (say, where $r$ an integer),

then, $b = r(2n-1)(2m-1)$

and $a = r(2n-1)(1-m^2)$

The above will be true if only 1st two conditions were supplied.

For all the three conditions, let $c^2+a^2+ca= r^2$ where r is an integer =>$r^2+ca$ must be perfect square and vice versa. ca=$r^2-R^2$ for some integer R. So, the given problem is same as finding a,b,c such that the product of any two is the difference of two squares.

Now $r^2+ca$ will be perfect square if r=$\frac{c-a}{2}$ where c-a is odd i.e., c,a are of opposite parity.

Then, $c^2+a^2+ca=(\frac{c-a}{2})^2$=>c+a=0.

Similarly, b+c=a+b=0. This provides only trivial solution (0,0,0) $ \in \mathbb{Z}^3$.

As ca=$r^2-R^2$, bc = $s^2-S^2$ and ab = $t^2-T^2$ for some integer s,S,t,T.

So, $a^2=\frac{ca.ab}{bc} =\frac{(r^2-R^2).(s^2-S^2)}{t^2-T^2} $

Now if r=$A^2+B^2$ and R= $A^2-B^2$

and if s=$C^2+D^2$ and S= $C^2-D^2$

and if t=$E^2+F^2$ and T= $E^2-F^2$ for some integers A,B,C,D,E,F.


b and c with be of the form ±$\frac{2.C.D.E.F}{A.B}$ and ±$\frac{2.E.F.A.B}{C.D}$

So, we need to find integers p,q,r such that p|2qr, q|2rp and r|2pq (think p=A.B, q=C.D and r=E.F).

share|cite|improve this answer
I am a bit baffled by this. Take the case $5^2+3^2+5\times 3 = 7^2$ (in other words $c=5$, $a=3$), then the first line above would give $(c+na)^2 = 7^2$, or $5+3a = 7$, and $n$ is then not an integer. Am I being a bit dim (as often the case!) – Old John Jul 5 '12 at 18:35
@OldJohn In this particular case we can take $n=-4$. I do share your skepticism if $a$ has more than one odd prime factor (this seems to be assuming that $c^2$ has only two square roots mod $a$). Also it doesn't appear that $b^2+c^2+bc$ has been addressed. – Erick Wong Jul 5 '12 at 18:51
OK, but is the solution above claiming that for any choice of $r$, $m$, $n$ in $\mathbb{Z}$, the last the lines will give a solution? (My calculations show otherwise - probably agreeing with your doubts about $b^2+c^2+bc$.) – Old John Jul 5 '12 at 18:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.