# Thread: Sum of two squares

1. ## Sum of two squares

Prove that 7, 19, 1295 are not the sums of squares.

How should I prove this question? Could you please teach me? Thank you very much.

2. Originally Posted by beta12
Prove that 7, 19, 1295 are not the sums of squares.

How should I prove this question? Could you please teach me? Thank you very much.
Simple.
Any number that is a sum of two squares is either,
congruent to 0,1,2 modulo 4. (Excerise for you)
But not these.

7=4(1)+3
19=4(4)+3
1295=4(323)+3

3. Hello, beta12!

Here's an elementary approach to The Perfect Hacker's solution.

Prove that 7, 19, 1295 are not the sums of two squares. **

We have the sum of two integer squares: .S .= .a² + b²

Since their sum is odd, one must be odd and the other must be even.

Let: .a .= .2m .and .b .= .2n + 1 .for integers m and n.

Then: . S .= .(2m)² + (2n+1)² .= .4m² + 4n² + 4n + 1 .= .4(m² + n² + n) + 1

Hence, if the sum of two squares is odd, it is one more than a multiple of 4.

And none of {7, 19, 1295} is of the form 4k + 1.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

**

Of course, the problem is limited to the sum of two squares.

If the number of squares is unlimited,
. . we have: .7 .= .1² + 1² + 1² + 1² + 1² + 1² + 1²

4. Originally Posted by Soroban

If the number of squares is unlimited,
. . we have: .7 .= .1&#178; + 1&#178; + 1&#178; + 1&#178; + 1&#178; + 1&#178; + 1&#178;

All you need is 4 squares to express any number
If you wish I can post a longgg proof of this when LaTeX is online.

Some history:
The name of this amazing theorem is 4 Square Problem.
(One of my favorite theorems of all time)

1)The Greeks belived it was true but unable to prove it.

2)Fermat in 17th Century announced that any number can be expressed as the sum of n polygonal numbers. The simplest case is n=4 which is this case. Gauss proved n=3 for triangular but even he was not able to match Fermant's abilities and quit. The great Cauchy proved it in general. But sadly we do not have Fermat's prove because he only did math for himself.

3)Before n=4 was proven Euler struggled to proven it for 40 years but failed. Finally France succeded and Lagrange claimed it proof. However, Lagrange being a kind man like always said he could have not proved it with out the amazing identity Euler discovered involving 4 squares and said the proof belonged to him.

4)In the future this problem became known as Waring's Problem which goes beyond squares to higher exponents. (I believe it has been solved).

5. Thank you so much Soroban and Perfecthacker!