## Wednesday, January 21, 2015

### Square sum of five squares

Figured out a general method for summing squares to an nth power, and found myself looking at summing three squares to get a square just to test it out. However, doing some web search found that is known and solved. Did a web search just now and didn't see summing five squares to get a square so think it worth showing just to see. The approach can sum any arbitrary number of squares to get a square or higher power though.

My most general result with sums of squares is that in general there must always exist nonzero x and y, such that for an integer n equal to 1 or higher, and an integer m equal to 3 or higher:

x2 + (m-1)y2 = mn

Where n starts at 1. Often I like to start it at zero so it's a count of iterations but is prettier starting at 1.

For a sum of c+1 squares: m = s12 +...+sc2 + 1

x2 + (s12 +...+sc2)y2 = mn

The BQD Iterator is:

Given nonzero integers u and v with

u2 + (s12 +...+ sc2)v2 = F

then it must also be true that

(u - (s12 +..+sc2)v)2 + (s12 +...+sc2)(u + v)2 = (s12 +...+ sc2 + 1)*F

So for 5 squares, I'll need 4 s's and I'll use primes: 2, 3, 5, and 7

Then m = 4 + 9 + 25 + 49 + 1 = 88

12 + 87*12 = 88

First iteration: (-86)2 + 87*(2)2 = 882

Which is: (-86)2 + 4*(2)2 + 9*(2)+ 25*(2)+ 49*(2)2= 882

Which is: 862 + 42 + 6+ 10+ 142= 882

Second iteration: (-260)2 + 87*(-84)2 = 883

Which is: (-260)2 + 4*(-84)2 + 9*(-84)2+ 25*(-84)2+ 49*(-84)= 883

Which is: 2602 + 1682  + 2522 +  4202+ 588= 883

Third iteration: (7048)2 + 87*(-344)2 = 884

Which is: (7048)2 + 4*(-344)2 + 9*(-344)+ 25*(-344)+ 49*(-344)2= 884

Which is: 70482 + 6882 + 1032+ 1720+ 2408= 884

Thank you modern computer systems where the calculator lets me do all of the above easily as I type out this post. Would be easy to program but not sure yet that there's a point. But then could go anywhere like do a square as the sum of 20 squares or whatever. Ok, now will do more with the look of my two results that sum to give a square.

First: 42 + 6+ 10+ 14+ 862  = 882

Second: 6882 + 1032+ 1720+ 2408 + 70482  = 884

Where I can divide off 64 to get:

862 + 129+ 215+ 301+ 8812  = 64*114

Which is: 862 + 129+ 215+ 301+ 8812  = 9682

So I found, two sums of fives squares that give a square:

42 + 6+ 10+ 14862 = 882

862 + 129+ 215+ 301+ 8812 = 9682

Some things are worth noting. First I'm setting some factors of the squares, so the other thing is I can pick some factors. And for this example chose to use prime numbers.

But those can conceivably divide off at some iteration, or be divided off, as you can choose to divide off common factors or not. Oh yeah, signs can be switched at each iteration to get alternate values. I tend to just go with the flow in terms of signs. Makes it easier for me just typing up demonstration posts.

It is interesting that 86 popped up twice. There could be all kinds of patterns that emerge, but to go searching for them generating a lot more would be best so a computer program would be better.

Guess it could the kind of project some enterprising number theorist might do as who knows what could be learned when you can play at this scale so easily.

But you don't have to be a specialist, as the mathematics is so elementary. Really cool! You only need to know basic algebra and have the desire to explore.

James Harris