Examples of Expressing Integers as a Sum of Two Squares

# Examples of Expressing Integers as a Sum of Two Squares

Recall from the Expressing Integers as a Sum of Two Squares page that if $n \in \mathbb{N}$ and $n$ has prime power factorization $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}$ where $p_i \equiv 1 \pmod 4$ for each $1 \leq i \leq k$ and $q_j \equiv 3 \pmod 4$ for each $1 \leq j \leq l$ then $n$ can be expressed as a sum of two squares if and only if $f_j$ is even for each $1 \leq j \leq l$.

In other words, $n$ cannot be expressed as a sum of two squares if $n$ has a prime factor $p^{2k-1}$ where $p \equiv 3 \pmod 4$. We will now look at some examples of expressing integers as a sum of two squares.

## Example 1

Determine if $600$ can be expressed as a sum of two squares and if so, find a representation for $600$.

The prime power factorization of $600$ is:

(1)
\begin{align} \quad 600 = 2^3 \cdot 3^1 \cdot 5^2 \end{align}

Note that $3 \equiv 3 \pmod 4$ but $1$ is not even, and so $600$ cannot be expressed as a sum of two squares.

## Example 2

Determine if $1034$ can be expressed as a sum of two squares and if so, find a representation for $1034$.

The prime power factorization of $1034$ is:

(2)
\begin{align} \quad 1034 = 2^1 \cdot 11^1 \cdot 47^1 \end{align}

Note that $11 \equiv 3 \pmod 4$ but $1$ is not even, so again, $1034$ cannot be expressed as a sum of two squares.

## Example 3

Determine if $98765$ can be expressed as a sum of two squares and if so, find a representation for $98765$.

The prime power factorization of $98765$ is:

(3)
\begin{align} \quad 98765 = 5^1 \cdot 19753^1 \end{align}

Since $5 \equiv 1 \pmod 4$ and $19753 \equiv 1 \pmod 4$ we have that $98765$ can be written as a sum of two squares. Namely:

(4)
\begin{align} \quad 98765 = 13^2 + 314^2 \end{align}