Permutation of the set is called messy if for any three indices , is not divisible by . Find all natural numbers for which there exists a messy permutation of the set .
Solution
We claim that there exists a messy permutation of if and only if is a power of .
First suppose that there is some messy permutation of . There must be some such that . If , then , which contradicts because we have assumed that the permutation is messy. If , then which is not possible. So and . Now if is odd, we get , which is again impossible. Therefore, we get there is no messy permutation for odd values of .
On the other hand, suppose that is a messy permutation and is a divisor of . Set . We remove the numbers in the permutation which are not divisible by to get where for each . Now is a permutation of modulo . We claim that this permutation is messy. Assume to the contrary, there are among 's such that . This implies , which is impossible because the first permutation was assumed to be messy.
Therefore, if there is a messy permutation for some integer , is not divisible by an odd number other than and so must be a power of .
Finally, we construct a messy permutation of by induction on . Obviously, is a messy permutation for . Suppose that is a messy permutation for . Now consider the sequence
This sequence is a permutation for . We claim this permutation is messy. If for some , then and because was assumed to be messy. Now is an odd number and so cannot be divisible by . This contradiction shows that is a messy permutation and so the proof is complete.