TITLE: Roots of permutations
QUESTION [28 upvotes]: Consider the equation $x^2=x_0$ in the symmetric group $S_n$, where $x_0\in S_n$ is fixed. Is it true that for each integer $n\geq 0$, the maximal number of solutions (the number of square roots of $x_0$) is attained when $x_0$ is the identity permutation? How far may it be generalized?

REPLY [5 votes]: For a general finite group $G$ and an arbitrary element $y \in G,$ there is a general way to use characters to compare the number of solutions of $x^{2} = y$ in $G$ with the number of solutions of $x^{2} = 1$ within $C_{G}(y).$ 
For notice that any element $x$ with $x^{2} = y$ already lies in $C_{G}(y).$ 
Hence (using the general formula mentioned in Alex's answer, but within the group 
$C_{G}(y)$) the number of solutions of $y^{2} = x$ is $\sum_{ \mu \in {\rm Irr}(C_{G}(y)} \nu(\mu) \mu(y),$ where $\nu(\mu)$ is the Frobenius-Schur indicator of $\mu$ ( which Alex denoted by $s(\mu)$).
But now we note (using Schur's Lemma) that unless $y{\rm ker} \mu$ has order $1$ or $2$ in $C_{G}(y)/{\rm ker}(\mu)$ we have $\nu(\mu) = 0$ since $\mu$ is certainly not real-valued.
Hence if $y$ has order $m,$ then we need only consider irreducible characters $\mu$ with $y$ in their kernel when $m$ is odd, and irreducible characters $\mu$ with $y^{2}$ in their kernel when $m$ is even.
In any case, the contribution to the sum from those characters with $y$ in their kernel is the same as the number of square roots of the identity in $C_{G}(y)/\langle y \rangle.$
I won't give all details, but we may continue to deduce that 
the difference between the number of square roots of the identity in $C_{G}(y)$ and the number of square roots of $y$ in $G$ is given by the formula:
$\sum_{\mu \in {\rm Irr}(C_{G}(y)/\langle y^{2} \rangle) \backslash
{\rm Irr}(C_{G}(y)/\langle y \rangle)} 2\nu(\mu)\mu(1).$
Note that this number is non-negative unless $C_{G}(y)$ has an irreducible character $\mu$ with $\nu(\mu) = -1$ and with $y^{2} \in {\rm ker} \mu$ but $y \not \in {\rm ker} \mu$.
Hence we may conclude in particular that for a general element $y$ of a general finite group $G,$ the number of square roots of $y$ in $G$ is already less that the number of solutions of square roots of the identity in $C_{G}(y)$ unless $C_{G}(y)$ has an irreducible character $\mu$ of Frobenius-Schur indicator $-1$ such that $y{\rm ker} \mu$ has order $2$ in $C_{G}(y)/{\rm ker} \mu.$
Latter edit: It is perhaps worth remarking that this argument shows that the number of square roots of $y$ in $G$ is the same as the number of square roots of $yM$ in $C_{G}(y)/M$, where $M$ is the normal subgroup $\langle y^{2} \rangle $ of $C_{G}(y).$ This reduces the computation of the number of square roots of $y \in G$ to the case that $y$ has order $1$ or $2$ and that $y \in Z(G).$
Returning to the (last part of the) original question, it means that each finite group $G$ for which the maximum number of square roots is not attained at the identity has a section (ie a factor group of a subgroup) $H$ such that $Z(H)$ such  contains an involution $u$ with the number of elements of order four with square $u$ at least two greater that the number of involutions of $H$ ( here an involtion is considered to be an element of order exactly two). Furthermore, the section $H$ has the form $C_{G}(y)/\langle y^{2} \rangle$ where $y$ is an element of $G$ with the maximum number of square roots. Note also that if the identity element does not have the maximum number of square roots then the element $y$ attaining the maximum number necessarily has even order.
Note that in the essential case that $y \in Z(G)$ is an involution, then $y$ has more square roots in $G$ than the identity does if and only if we have 
$\sum_{ \{\chi \in {\rm Irr}(G) \backslash {\rm Irr}(G/\langle y \rangle): \nu(\chi) = -1 \}}\chi(1)  > \sum_{ \{\chi \in {\rm Irr}(G) \backslash {\rm Irr}(G/\langle y \rangle): \nu(\chi) = +1 \} } \chi(1).$