12. find all natural numbers that are in the form

$$
\frac{(a+b+c)^{2}}{a b c}
$$

where $a, b$ and $c$ are natural numbers.
## Solution

Assume that the natural number $n$ can be represented in this form, i.e.

$$
\frac{(a+b+c)^{2}}{a b c}=n
$$

Keep $n$ fixed and choose $a, b, c$ with $a \geq b \geq c$ and $a+b+c$ minimal. The above equation can be rewritten as

$$
a^{2}+a(2 b+2 c-n b c)+(b+c)^{2}=0
$$

This is a quadratic equation in $a$ that has a further solution $a^{\prime}$. According to Vieta

$$
\begin{aligned}
a+a^{\prime} & =n b c-2 b-2 c \\
a \cdot a^{\prime} & =(b+c)^{2}
\end{aligned}
$$

From the first equation it follows that $a^{\prime}$ is whole, from the second that $a^{\prime}>0$. Due to the minimality of $a+b+c$, $a^{\prime} \geq a$ and therefore $a^{2} \leq a a^{\prime}=(b+c)^{2}$, i.e. $b+c \geq a \geq b \geq c>0$. We now distinguish between two cases.

(a) Let $c=1$. Then $a=b$ or $a=b+1$. In the first case, $a^{2} \mid(1+2 a)^{2}$, i.e. $a^{2} \mid 1+4 a$. This only applies for $a=1$, which leads to $n=9$. In the second case, $a(a-1) \mid(2 a)^{2}$ applies, so $a=2,3,5$ and $n=8,6,5$.

(b) Now let $c>1$. Then the estimate applies

$$
\begin{aligned}
n=\frac{(a+b+c)^{2}}{a b c} & =\frac{a}{b c}+\frac{b}{c a}+\frac{c}{a b}+2\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right) \leq \frac{b+c}{b c}+\frac{1}{c}+\frac{1}{a}+2 \cdot \frac{3}{2} \\
& \leq 1+\frac{1}{2}+\frac{1}{2}+3=5
\end{aligned}
$$

We have used the fact that $b, c \geq 2$ is $b+c \leq b c$.

This means that only $n=1,2,3,4,5,6,8,9$ are possible. The following list shows that all of these numbers can be represented in the desired form:

$$
\begin{array}{ll}
1=(9+9+9)^{2} /(9 \cdot 9 \cdot 9) & 5=(5+4+1)^{2} /(5 \cdot 4 \cdot 1) \\
2=(8+4+4)^{2} /(8 \cdot 8 \cdot 4) & 6=(3+2+1)^{2} /(3 \cdot 2 \cdot 1) \\
3=(3+3+3)^{2} /(3 \cdot 3 \cdot 3) & 8=(2+1+1)^{2} /(2 \cdot 1 \cdot 1) \\
4=(4+2+2)^{2} /(4 \cdot 2 \cdot 2) & 9=(1+1+1)^{2} /(1 \cdot 1 \cdot 1)
\end{array}
$$