Z2) Determine all natural numbers $n \geq 2$ that have a representation of the form

$$
n=k^{2}+d^{2}
$$

where $k$ is the smallest divisor of $n$ greater than 1 and $d$ is any divisor of $n$.
## Solutions:

We give two solutions. The difference is that the first solution looks at even/odd first and the second only towards the end. There are also solutions that look at even/odd somewhere in the middle. The two middle parts are also different, but interchangeable.

## 1st solution (Viviane):

If $n$ is odd, all divisors of $n$, in particular $k$ and $d$, are also odd. But then $k^{2}+d^{2}$ is even, which is not possible. Therefore $n$ is even and the smallest divisor of an even number greater than 1 is 2, so $k=2$. Since $n$ and $k$ are even, $d$ must also be even. We can therefore write $d=2 t$ and get $n=4+4 t^{2}$. Since $d$ is a divisor of $n$, $d \mid 4+4 t^{2}$ applies, i.e. $2 t \mid 4\left(1+t^{2}\right)$ and also $t \mid 2\left(1+t^{2}\right)$. Since $g g T\left(t, 1+t^{2}\right)=1$, $t \mid 2$ must apply. Thus there are the possibilities $t=1,2$. Thus $d=2,4$ applies. By calculation, $n=8$ and $n=20$, and the condition that $k$ is the smallest divisor of $n$ greater than 1 and that $d$ is a divisor of $n$ is fulfilled.