Expressing Integers Properly as a Sum of Two Squares

# Expressing Integers Properly as a Sum of Two Squares

Recall from the Expressing Integers as a Sum of Two Squares page that an $n \in \mathbb{N}$ where:

(1)
\begin{align} \quad n = 2^{\alpha} p_1^{e_1} p_2^{e_2} ... p_k^{e_k} q_1^{f_1} q_2^{f_2} ... q_l^{f_l} \end{align}

and $p_i \equiv 1 \pmod 4$ for each $1 \leq i \leq k$, $q_j \equiv 3 \pmod 4$ for each $1 \leq j \leq l$, can be expressed as a sum of two squares if and only if $f_j$ is even for each $1 \leq j \leq l$. We would now like to investigate when an integer can be properly represented as a sum of two squares.

 Proposition 1: $2^{\alpha}$ can be properly represented as a sum of two squares if and only if $\alpha = 1$
• Proof: $\Rightarrow$ Suppose that $2^{\alpha}$ can be properly represented as a sum of two squares. Then $2^{\alpha} = x_0^2 + y_0^2$ for some integers $x_0 ,y_0 \in \mathbb{Z}$. Observe that then $x_0, y_0$ are both odd integers. So $x_0^2 \equiv 1 \pmod 4$ and $y_0^2 \equiv 1 \pmod 4$. So $x_0^2 + y_0^2 \equiv 2 \pmod 4$. But $2^{\alpha} \equiv 0 \pmod 4$ if $\alpha \geq 2$. So $\alpha = 1$.
• $\Leftarrow$ Suppose that $\alpha = 1$. Then clearly $2 = 1^2 + 1^2$ and $(1, 1) = 1$. $\blacksquare$
 Proposition 3: If $p \equiv 3 \pmod 4$ then $p^{2k}$ cannot be properly represented as a sum of two squares.
• Proof: Suppose that $p^{2k}$ can be be properly represented as a sum of two squares. Then there exists integers $x_0, y_0 \in \mathbb{Z}$ such that $p^{2k} = x_0^2 + y_0^2$ and $(x_0, y_0) = 1$.
• Recall that the only integer solutions to $x^2 + y^2 = z^2$ are given for all $m, n \in \mathbb{Z}$ with $(m, n) = 1$ by:
(2)
\begin{align} \quad x &= m^2 - n^2 \\ \quad y &= 2mn \\ \quad z &= m^2 + n^2 \end{align}
• Since $(p^k)^2 = x_0^2 + y_0^2$ we must have that for some $m, n \in \mathbb{Z}$ with $(m, n) = 1$.
(3)
\begin{align} \quad x_0 &= m^2 - n^2 \\ \quad y_0 &= 2mn \\ \quad p^k &= m^2 + n^2 \end{align}
• So $p^k = m^2 + n^2$. If $k$ is odd the equation, $p^k = m^2 + n^2$ implies that $p$ is expressible as a sum of two squares, which is a contradiction since $p \equiv 3 \pmod 4$ and $k$ is not an even exponent. If $k$ is even we can continue the procedure above we arrive at the above contradiction. So $p^{2k}$ cannot be properly represented as a sum of two squares. $\blacksquare$
 Proposition 4: If $p \equiv 1 \pmod 4$ then $p^k$ can be properly represented as a sum of two squares.

Proving proposition 4 requires some work. The results on the A Formula for P(n) = N(n) page will imply proposition 4.