# Integer solutions to $a^{2}+b^{2}+c^{2} = d^{2}+e^{2}+f^{2}$, where $a, b, c, d, e, f \neq 0$

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.

• 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. – Dietrich Burde Dec 20 '17 at 12:28
• Could you point me to some good papers? – Joshua Farrell Dec 20 '17 at 12:30
• 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. – Dietrich Burde Dec 20 '17 at 12:34
• math.stackexchange.com/questions/1786554/… – individ Dec 20 '17 at 13:00
• 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/… – 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.

Consider

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

Similarly

$$(-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).

Equation:

$$a^2+b^2+c^2=x^2+y^2+z^2$$

You can write a simple solution:

$$a=q^2+s^2+k^2-p^2-t^2$$

$$b=q^2+s^2+k^2-p^2+t^2+2pt-2kt-2st-2qt$$

$$c=q^2+s^2+k^2+p^2-t^2+2tp-2kp-2sp-2qp$$

$$x=p^2+t^2+k^2-q^2-s^2-2kt-2pk+2sk+2qk$$

$$y=p^2+t^2-k^2-q^2+s^2-2ts-2ps+2ks+2qs$$

$$z=p^2+t^2-k^2+q^2-s^2-2tq-2pq+2kq+2sq$$

$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.

$c:=\alpha^2+\beta^2=|\alpha+i\beta|^2=|(\alpha+i\beta)^2|=|\alpha^2-\beta^2+i2\alpha\beta|=\sqrt{(\alpha^2-\beta^2)^2+(2\alpha\beta)^2}$

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$ .

$d:=\alpha^2+\beta^2+\gamma^2=||\alpha+i\beta|+i\gamma|^2=…=\sqrt{(\alpha^2+\beta^2-\gamma^2)^2+(2\alpha\gamma)^2+(2\beta\gamma)^2}$

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$ .
{"ft_lang_label":"__label__en","ft_lang_prob":0.77441275,"math_prob":0.9999585,"size":2692,"snap":"2019-35-2019-39","text_gpt3_token_len":1011,"char_repetition_ratio":0.110119045,"word_repetition_ratio":0.20058997,"special_character_ratio":0.37964338,"punctuation_ratio":0.08571429,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000079,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-19T19:19:21Z\",\"WARC-Record-ID\":\"<urn:uuid:d3983573-c065-431a-8a43-1d4809a1aaae>\",\"Content-Length\":\"162199\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1e15362d-2510-46bf-8349-238e85be2956>\",\"WARC-Concurrent-To\":\"<urn:uuid:7854b038-b892-4e1d-9ce4-9f128996082b>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/2574407/integer-solutions-to-a2b2c2-d2e2f2-where-a-b-c-d?noredirect=1\",\"WARC-Payload-Digest\":\"sha1:RH7P27MTSUBAYRVE7GAW3BKB2DWBCY26\",\"WARC-Block-Digest\":\"sha1:G4E75CCHSUTZEFR3KDIZHNNCZCV52ZV3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514573570.6_warc_CC-MAIN-20190919183843-20190919205843-00559.warc.gz\"}"}