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.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.Sign up to join this community
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$
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$ .