Prove that If a prime number p can be written as a sum of 2
Prove that, If a prime number, p, can be written as a sum of 2 squares, then p = 2 or p = 4n+1.
Solution
2=1^2+1^2
Hence, p=2 can be written as sum of 2 squares
Any other prime is odd of the form
4n+3 or 4n+1
We know that square of any natural number modulo 4 is either 0 or 1
Hence sum of squares of two natural numbers can be either 0, 1 or 2 modulo 4
But, p is prime and odd so it cn only be 1 modulo 4
Hence proved.
