If x is an even integer that can be written as the sum of two perfect squares, prove that x / 2 can also be written as the sum of two perfect squares.

#### Solution

Since x can be written as the sum of two perfect squares, x = a^{2} + b^{2}.

Since x is even, a^{2} and b^{2} are either both odd or both even (i.e., have the same parity).

Since parity does not change when you square a number, that means a and b also have the same parity.

Now x / 2 = (a^{2} + b^{2}) / 2 = ((a + b) / 2)^{2} + ((a – b) / 2)^{2}.

Since a and b are the same parity, that means (a + b) / 2 and (a – b) / 2 are both integers. Therefore x / 2 can be written as the sum of two perfect squares.