We call a permutation (a1,a2,...,an) of (1,2,...,n) quadratic if there exists at least a perfect square among the numbers a1, a_1 \plus{} a_2, ..., a_1 \plus{} a_2 \plus{} ... \plus{} a_n. Find all natural numbers n such that all permutations in Sn are quadratic.
Remark. Sn denotes the n-th symmetric group, the group of permutations on n elements. quadraticsinductiongroup theorycombinatorics proposedcombinatorics