Convert the following into sum of four squares:
(i) $343= 7^3$
(ii) $2401= 7^4$
(iii) $16 807= 7^5$
Determine a formula for converting $7^n$, where $n$ is a natural number, to sum of four squares.
Let $x = a^2 + b^2 + c^2 + d^2$. Determine a formula for converting $x^n$ into sum of four squares.
We'll be using the Sum of Four Squares Identity (8.10) is
$$ \begin{align} (a^2 + b^2 + c^2 + d^2) \times (x^2 + y^2 + z^2 + w^2) & = (ax + by + cz + dw)^2 + (az− bw− cx + dy)^2 \\ \\ & + (ay− bx + cw− dz)^2 + (aw + bz− cy− dx)^2 \end{align} $$
(i) $ 343 = 7^2 \times 7 = (7^2 + 0^2 + 0^2 + 0^2) \times (2^2 + 1^2 + 1^2 + 1^2) = 14^2 + 7^2 + 7^2 + 7^2 $
(ii) $ 2401 = 7^2 \times 7^2 = (7^2 + 0^2 + 0^2 + 0^2) \times (7^2 + 0^2 + 0^2 + 0^2) = 49^2 $
(iii) $ 16807 = 7^4 \times 7 = (49^2 + 0^2 + 0^2 + 0^2) \times (2^2 + 1^2 + 1^2 + 1^2) = 98^2 + 49^2 + 49^2 + 49^2$
We consider two cases for $n$ in $7^n$, even $n=2m$ and odd $n=2m+1$ for some integer $m$.
For even $n=2m$ we have
$$ 7^n = 7^{2m} = (7^m)^2 $$
For odd $n=2m+1$ we have
$$ 7^n = 7^{2m+1} = (7^m)^2 \times (2^2 + 1^2 + 1^2 + 1^2) = (2 \times 7^m)^2 + (7^m)^2 + (7^m)^2 + (7^m)^2) $$
In summary,
$$ 7^n = \begin{cases} (7^m)^2 & \text{even } n=2m \\ \\ (2 \times 7^m)^2 + (7^m)^2 + (7^m)^2 + (7^m)^2 & \text{odd } n=2m+1 \end{cases} $$
We again consider 2 cases for $n$, even $n=2m$ and odd $n=2m+1$.
For even $n=2m$ we have
$$ x^n = x^{2m} = (x^m)^2 $$
For odd $n=2m+1$ we have
$$ x^n = x^{2m+1} = (x^m)^2 \times (a^2 + b^2 + c^2 + d^2) = (ax^m)^2 + (bx^2)^2 + (cx^2)^2 + (cx^2)^2 $$
In summary,
$$ x^n = \begin{cases} (x^m)^2 & \text{even } n=2m \\ \\ (ax^m)^2 + (bx^2)^2 + (cx^2)^2 + (cx^2)^2 & \text{odd } n=2m+1 \end{cases} $$