# The sum of the square of three integers is 324. How do you find the integers?

Aug 19, 2017

The only solution with distinct positive integers is $\left(2 , 8 , 16\right)$

The full set of solutions is:

$\left\{\begin{matrix}0 & 0 & \pm 18 \\ \pm 2 & \pm 8 & \pm 16 \\ \pm 8 & \pm 8 & \pm 14 \\ \pm 6 & \pm 12 & \pm 12\end{matrix}\right\}$

#### Explanation:

We can save ourselves some effort by considering what form squares take.

If $n$ is an odd integer then $n = 2 k + 1$ for some integer $k$ and:

${n}^{2} = {\left(2 k + 1\right)}^{2} = 4 \left({k}^{2} + k\right) + 1$

Notice that this is an odd integer of the form $4 p + 1$.

So if you add the squares of two odd integers, then you will always get an integer of the form $4 k + 2$ for some integer $k$.

Note that $324 = 4 \cdot 81$ is of the form $4 k$, not $4 k + 2$.

Hence we can deduce that the three integers must all be even.

There are a finite number of solutions in integers since ${n}^{2} \ge 0$ for any integer $n$.

Consider solutions in non-negative integers. We can add variants involving negative integers at the end.

Suppose the largest integer is $n$, then:

$\frac{324}{3} = 108 \le {n}^{2} \le 324 = {18}^{2}$

So:

$12 \le n \le 18$

That results in possible sums of squares of the other two integers:

$324 - {18}^{2} = 0$

$324 - {16}^{2} = 68$

$324 - {14}^{2} = 128$

$324 - {12}^{2} = 180$

For each of these values $k$, suppose the largest remaining integer is $m$. Then:

$\frac{k}{2} \le {m}^{2} \le k$

and we require $k - {m}^{2}$ to be a perfect square.

Hence we find solutions:

$\left(0 , 0 , 18\right)$

$\left(2 , 8 , 16\right)$

$\left(8 , 8 , 14\right)$

$\left(6 , 12 , 12\right)$

So the only solution with distinct positive integers is $\left(2 , 8 , 16\right)$

Aug 20, 2017

${x}^{2} + {y}^{2} + {z}^{2} = {2}^{2} {3}^{4} = {w}^{2}$

It is easy to show that $x , y$ and $z$ must be even because making $x = 2 {m}_{x} + 1 , y = 2 {m}_{y} + 1$ and $z = 2 {m}_{z}$ we have

$4 {m}_{x}^{2} + 4 {m}_{x} + 4 {m}_{y}^{2} + 4 {m}_{y} + 4 {m}_{z}^{2} + 2 = 4 \times {3}^{4}$ or

$2 {m}_{x}^{2} + 2 {m}_{x} + 2 {m}_{y}^{2} + 2 {m}_{y} + 2 {m}_{z}^{2} + 1 = 2 \times {3}^{4}$ which is absurd.

So we will consider from now on

${m}_{x}^{2} + {m}_{y}^{2} + {m}_{z}^{2} = {3}^{4}$

Now considering the identity

${\left(\frac{{l}^{2} + {m}^{2} - {n}^{2}}{n}\right)}^{2} + {\left(2 l\right)}^{2} + {\left(2 m\right)}^{2} = {\left(\frac{{l}^{2} + {m}^{2} + {n}^{2}}{n}\right)}^{2}$

with $l , m , n$ arbitrary positive integers and making

$\left\{\begin{matrix}{m}_{x} = \frac{{l}^{2} + {m}^{2} - {n}^{2}}{n} \\ {m}_{y} = 2 l \\ {m}_{z} = 2 m \\ {m}_{w} = \frac{{l}^{2} + {m}^{2} + {n}^{2}}{n}\end{matrix}\right.$ ------ [1]

we have

${l}^{2} + {m}^{2} + {n}^{2} = {3}^{2} n$ or solving for $n$

$n = \frac{1}{2} \left(9 \pm \sqrt{{9}^{2} - 4 \left({l}^{2} + {m}^{2}\right)}\right)$

so for feasibility we need

${9}^{2} - 4 \left({l}^{2} + {m}^{2}\right) = {p}^{2}$ or

${9}^{2} - {p}^{2} = 4 \left({l}^{2} + {m}^{2}\right) = q$

so for $p = \left\{1 , 2 , 3 , 4 , 5 , 6 , 7 , 8\right\}$ we will have

$q = \left\{80 , 77 , 72 , 65 , 56 , 45 , 32 , 17\right\}$ so the feasible $q$ are

${q}_{f} = \left\{80 , 72 , 56 , 32\right\}$ because $q \equiv 0 \mod 4$

so we have to find

$4 \left({l}_{i}^{2} + {m}_{i}^{2}\right) = {q}_{i}$ or

${l}_{i}^{2} + {m}_{i}^{2} = \frac{1}{4} {q}_{i} = {\overline{q}}_{i} = \left\{20 , 18 , 14 , 8\right\}$

Here as we can easily verify, the only solution is for

${l}_{1} = 2 , {m}_{1} = 4$ because

${l}_{1}^{2} + {m}_{1}^{2} = {\overline{q}}_{1}$

and consequently ${n}_{1} = \left\{4 , 5\right\}$

and substituting into [1] we get

${n}_{1} = 4 \Rightarrow \left\{\begin{matrix}{m}_{x} = 1 \\ {m}_{y} = 4 \\ {m}_{z} = 8\end{matrix}\right.$

${n}_{1} = 5 \Rightarrow \left\{\begin{matrix}{m}_{x} = - 1 \\ {m}_{y} = 4 \\ {m}_{z} = 8\end{matrix}\right.$

giving the solution

$\left\{\begin{matrix}x = 2 {m}_{x} = 2 \\ y = 2 {m}_{y} = 8 \\ z = 2 {m}_{z} = 16\end{matrix}\right.$