Question 177
Find all positive integers $n$ such that there is a permutation $\sigma$ of the set $\{1,2,...,n\}$ for which $\sqrt{\sigma(1)+\sqrt{\sigma(2)+\sqrt{\cdots+\sqrt{\sigma(n)}}}}$ is a rational number.
(A permutation of the set $\{1,2,...,n\}$ is a one-to-one function of this set to itself.)
(A permutation of the set $\{1,2,...,n\}$ is a one-to-one function of this set to itself.)