Proving mean of two odd squares is sum of two squares.
By Abigail Rogers •
From Fermat's two squares theorem we know that an odd prime p ≡ 1 (mod 4) is the sum of two squares. How do we prove a more general case: The average of two odd squares which is also congruent to 1 mod 4 is the sum of two squares. Actually, this arises from the problem of requiring to prove m is the sum of two triangular numbers iff 4m + 1 is the sum of two squares.
$\endgroup$1 Answer
$\begingroup$$$\dfrac{p^2+q^2}{2}=\left(\dfrac{p+q}{2}\right)^2+\left(\dfrac{p-q}{2}\right)^2$$
$\endgroup$