# Math Help - 2p as the sum of squares

1. ## 2p as the sum of squares

Suppose that the odd prime p = x^2 + y^2 with x > y > 0. Find integers u and v (in terms of x and y) such that 2p = u^2 + v^2 with u > v > 0.

Okay, I know that this means 2p = 2x^2 + 2y^2, and then u^2 + v^2 = 2x^2 + 2y^2. I'm not sure it helps, but since p is prime and it can be written as the sum of two squares, then p ≡ 1 mod 4. I'm not sure what I should do next.

2. What is $(x+y)^2 + (x-y)^2$ ?

3. Apply the identity:
if x=u^2+v^2, y=s^2+t^2, then xy=(us+vt)^2+(ut-vs)^2.
since 2 and p both can be written as sum of two squares, so let x=2,y=p, the result follows immediately.