Exercise 6. Find all integers $n \geqslant 1$ having the following property: there exists a permutation $d_{1}, d_{2}, \ldots, d_{k}$ of the positive divisors of $n$ such that, for all $i \leqslant k$, the sum $d_{1}+d_{2}+\ldots+d_{i}$ is a perfect square.
Solution to Exercise 6 Let $n$ be one of the integers sought, and $d_{1}, d_{2}, \ldots, d_{k}$ an appropriate permutation of the positive divisors of $n$. For any integer $i \leqslant k$, we set $s_{i}=\sqrt{d_{1}+d_{2}+\ldots+d_{i}}$. We say that an integer $\ell$ is good if $s_{i}=i$ and $d_{i}=2 i-1$ for all $i \leqslant \ell$. Below, we will prove that any integer $\ell \leqslant k$ is good.

First, for any integer $i \geqslant 2$, we already note that

$$
d_{i}=s_{i}^{2}-s_{i-1}^{2}=\left(s_{i}-s_{i-1}\right)\left(s_{i}+s_{i-1}\right) \geqslant s_{i}+s_{i-1} \geqslant 2
$$

Consequently, $d_{1}=s_{1}=1$.

Now consider a good integer $\ell \leqslant k-1$. We will prove that $\ell+1$ is also good. Indeed, if $s_{\ell+1}+s_{\ell}$ divides $\left(s_{\ell+1}-s_{\ell}\right)\left(s_{\ell+1}+s_{\ell}\right)=d_{\ell+1}$, then it divides $n$. Therefore, there exists an integer $m$ such that

$$
d_{m}=s_{\ell+1}+s_{\ell} \geqslant 2 s_{\ell}+1 \geqslant 2 \ell+1
$$

Since $d_{m}>d_{i}$ for all $i \leqslant \ell$, we deduce that $m \geqslant \ell+1$. But then

$$
s_{\ell+1}+s_{\ell}=d_{m}=\left(s_{m}-s_{m-1}\right)\left(s_{m}+s_{m-1}\right) \geqslant\left(s_{m}-s_{m-1}\right)\left(s_{\ell+1}+s_{\ell}\right) \geqslant s_{\ell+1}+s_{\ell}
$$

The inequalities are therefore equalities, which means that $s_{m}+s_{m-1}=s_{\ell+1}+s_{\ell}$, and that $m=\ell+1$, and that $s_{m}-s_{m-1}=1$, i.e., $s_{\ell+1}=s_{\ell}+1=\ell+1$. We conclude that

$$
d_{\ell+1}=\left(s_{\ell+1}-s_{\ell}\right)\left(s_{\ell+1}+s_{\ell}\right)=2 \ell+1
$$

which means as expected that $\ell+1$ is good.

In conclusion, the divisors of $n$ are the integers $1,3, \ldots, 2 k-1$. Conversely, if the divisors of $n$ are the integers $1,3, \ldots, 2 k-1$, the integer $n$ certainly fits.

In particular, if $k \geqslant 2$, the integer $d_{k-1}$ is an odd divisor of $n-d_{k-1}=2$, so $d_{k-1}=1$ and $k=2$. Thus, either $k=1$, in which case $n=1$, or $k=2$, in which case $n=3$. In both cases, these values of $n$ fit. The integers sought are therefore $n=1$ and $n=3$.

Comment from the graders This problem was rather difficult and was solved in its entirety by very few students: only about ten students obtained full marks.

However, many students were able to earn points by trying to determine what the first divisors of the permutation should be. Many students, for example, obtain $d_{1}=1, d_{2}=3, d_{3}=5$, but "dare" not continue by attempting induction to show that $d_{i}=2 i-1$. Some want to conclude directly, which is not possible here, and many papers end abruptly and without any justification with: "we deduce that 1 and 3 are the only solutions." It is important to be aware that this kind of bluff is rarely rewarding.