## Sum of four squares

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.

 Quote by 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.
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.

 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?

## Sum of four squares

 Quote by 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.
Sorry, meant to quote you in previous post.

 Blog Entries: 2 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: http://en.wikipedia.org/wiki/Modular...AAAAAAALgaAAA=

 Quote by 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: http://en.wikipedia.org/wiki/Modular...AAAAAAALgaAAA=
Ah, I remember now. This came up on a maths test I once did. Completely forgot about it though. Thanks for the help.

 Tags lagrange's theorem, sum of squares