Problem

Source: Balkan Olympiad 2007,problem 3

Tags: algebra, polynomial, floor function, induction, number theory unsolved, number theory



Find all positive integers $n$ such that there exist a permutation $\sigma$ on the set $\{1,2,3, \ldots, n\}$ for which \[\sqrt{\sigma(1)+\sqrt{\sigma(2)+\sqrt{\ldots+\sqrt{\sigma(n-1)+\sqrt{\sigma(n)}}}}}\] is a rational number.