How does one approach something like this? Is there an equivalent Legendre's three-square theorem for the sum of three squares in two different ways?

It seems like the only way to approach it would be via some computer power.

  • $\begingroup$ No, this is not the only way. There is a lot of literature on sums of squares. Some references are given here, but there is also more specific literature. $\endgroup$ – Dietrich Burde Dec 20 '17 at 12:28
  • $\begingroup$ Could you point me to some good papers? $\endgroup$ – Joshua Farrell Dec 20 '17 at 12:30
  • $\begingroup$ Yes, I can. But before it is perhaps worth to point you to some questions at MSE covering this, e.g., this question, with an answer by Tito Piezas III, who has a website with such identities. Also OEIS is helpful. $\endgroup$ – Dietrich Burde Dec 20 '17 at 12:34
  • $\begingroup$ math.stackexchange.com/questions/1786554/… $\endgroup$ – individ Dec 20 '17 at 13:00
  • $\begingroup$ This is not so. You can always ask in advance any number of times representations of a number as a sum of 3 squares. At least 2 times. At least 4. Any preassigned number. artofproblemsolving.com/community/… $\endgroup$ – individ Dec 20 '17 at 13:07

There is a method to find the different primitive representations of an integer $n$ as the sum of three squares, see here. This gives solutions to the above equation. For example, we have $150$ different representations of $n=225=a^2+b^2+c^2$, and $96$ primitive ones among them. So we can choose each pair of these solutions to obtain $$ a^2+b^2+c^2=n=d^2+e^2+f^2. $$


When $ a = -d, b=-e, c=-f $ then it satisfies the equality.


$$ (-99)^2+(-100)^2+(-101)^2 = (99)^2+(100)^2+(101)^2 $$


$$ (-d)^2+(-e)^2+(-f)^2= d^2+e^2+f^2 $$

Where $ a≠b≠c≠d≠e≠f$

So infinite integral solutions are possible. (Not positive integral).




You can write a simple solution:







$p,t,k,q,s$ - any integer asked us.


There are a lot of methods, e.g. matrices are very useful.

But to avoid complicate constructions I will show you an easy way. After some calculations you can imagine how a possible general solution looks like.

We begin with $3$ variables $a,b,c$ . Here '$i$' is the imaginary unit.


We get $a^2+b^2=c^2$ with e.g. $a:=\alpha^2-\beta^2$ and $b=2\alpha\beta$ .

We continue with $4$ variables $a,b,c,d$ .


We get $a^2+b^2+c^2=d^2$ with e.g. $a:=\alpha^2+\beta^2-\gamma^2$ , $b=2\alpha\gamma$ and $c=2\beta\gamma$ .

If we like to have $a^2+b^2-c^2=d^2$ it’s enough to substitute $\beta$ by $i\beta$ .

So, your problem can be started with $f:=\alpha^2+\beta^2+\gamma^2+\delta^2+\epsilon^2=…$ and you will get

a formula for $a^2+b^2+c^2+d^2+e^2=f^2$ . To get $a^2+b^2+c^2-d^2-e^2=f^2$ you only

have to substitute e.g. $\delta$ by $i\delta$ and $\epsilon$ by $i\epsilon$ .


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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