# Sum of four squares

1. Nov 17, 2012

### karpmage

Lagrange's four-square theorem states that any natural number can be expressed as the sum of four integer squares. I've noticed that the first few values of 8n-1 can all only be expressed as a minimum of the sum of four squares. Is this true for all values of n? What's the proof behind it? Thanks.

2. Nov 18, 2012

### willem2

The possible values of squares modulo 8 are 0, 1 and 4. There's only one way to make 7 from 0, 1 and 4 using a maximum of 4 numbers.

3. Nov 18, 2012

### karpmage

By what i said i mean

7 = 2^2 + 1^2 + 1^2 + 1^2
15 = 3^2 + 2^2 + 1^2 + 1^2
23 = 3^2 + 3^2 + 2^2 + 1^2
31 = 3^2 + 3^2 + 3^2 + 2^2
etc.

i.e. The first few values of 8n-1 (The first 10 at least) can't be shown as a sum of less than four squares.

Not sure what you mean by modulo 8 and what-not, sorry. You might have to dumb it down a bit for me. What exactly are you trying to say?

4. Nov 18, 2012

### karpmage

Sorry, meant to quote you in previous post.

5. Nov 18, 2012

### MarneMath

Think about clock work math. If it's 11 a.m. and add two more hours we get 1 p.m. You can view this as 11 mod 12 + 2 mod 12 = 1 mod 12. So what he's saying is that the values in mod 8 that are squared can only be 0, 1, and 4. So now if you consider 7 mod 8, you can only get that by adding 1 + 1 + 1 + 4. If you're not familiar with this method: