6.1. Let $d_{1}, d_{2}, \ldots, d_{k}$ be all the divisors of a positive integer $n$ and let $1=d_{1}<$ $d_{2}<\cdots<d_{k}=n$. Find all numbers $n$ for which $k \geq 4$ and

$$
d_{1}^{2}+d_{2}^{2}+d_{3}^{2}+d_{4}^{2}=n
$$
6.1. If $d_{2}>2$, then $n, d_{2}, d_{3}$ and $d_{4}$ are odd. So $d_{1}^{2}+d_{2}^{2}+d_{3}^{2}+d_{4}^{2}$ is even, which is a contradiction. Therefore $d_{2}=2, n$ is even and from the equality $n=1^{2}+2^{2}+d_{3}^{2}+d_{4}^{2}$ we obtain that exactly one of the numbers $d_{3}$ and $d_{4}$ is even.
a) Let $d_{3}$ be even, i.e. $d_{3}=2 a, a \geq 1$. Then $a<d_{3}$ is a divisor of $n$ and hence $a=d_{1}=1$, or $a=d_{2}=2$. It is easy to check that both cases are impossible.

b) If $d_{4}$ is even, $d_{4}=2 a, a \geq 1$, a similar reasoning shows that $a=1, a=2$ or $a=d_{3}$. The case $a=1$ leads to a contradicition. If $a=2$, then $d_{4}=4$, so that $d_{3}=3$. Therefore $n=1^{2}+2^{2}+3^{2}+4^{2}=30$, which is not divisible by four.

Now it suffices to consider the case $a=d_{3}$. We have $d_{4}=2 d_{3}$, and then

$$
n=1^{2}+2^{2}+d_{3}^{2}+\left(2 d_{3}\right)^{2}=5\left(d_{3}^{2}+1\right)
$$

Since $d_{3}$ divides $n$, we obtain that $d_{3}=5, d_{4}=10, n=1^{2}+2^{2}+5^{2}+10^{2}=130$. All the divisors of 130 are $1,2,5,10,13,26,65,130$. Hence, $n=130$ is the unique solution.