Determine which positive integers have the following property: For all integers that are relatively prime to , there exists a permutation such that for all .
Solution
The desired property holds if and only if or . Let be the permutation of induced by multiplication by ; the original problem asks for which does always have a square root. For , is the identity permutation and hence has a square root. We next identify when a general permutation admits a square root. \begin{lemma} \label{lem:2023B5-2} A permutation in can be written as the square of another permutation if and only if for every even positive integer , the number of cycles of length in is even. \end{lemma} \begin{proof} We first check the "only if" direction. Suppose that . Then every cycle of of length remains a cycle in if is odd, and splits into two cycles of length if is even. We next check the "if" direction. We may partition the cycles of into individual cycles of odd length and pairs of cycles of the same even length; then we may argue as above to write each partition as the square of another permutation. \end{proof} Suppose now that is odd. Write where is an odd prime, is a positive integer, and . By the Chinese remainder theorem, we have a ring isomorphism Recall that the group is cyclic; choose reducing to a generator of and to the identity in . Then consists of cycles (an odd number) of length (an even number) plus some shorter cycles. By Lemma~\ref{lem:2023B5-2}, does not have a square root. Suppose next that . Write with odd, so that Then acts on and with the same cycle structure, so every cycle length occurs an even number of times. By Lemma~\ref{lem:2023B5-2}, has a square root. Finally, suppose that is divisible by 4. For , consists of two fixed points ( and ) together with cycles (an odd number) of length 2 (an even number). By Lemma~\ref{lem:2023B5-2}, does not have a square root.