TITLE: When do the sizes of conjugacy classes and squares of degrees of irreps give the same partition for a finite group?
QUESTION [12 upvotes]: I should admit the question below does not have a serious motivation. But still I found it somehow natural.
Let $G$ be a finite group of order $n$ with $h$ conjugacy classes. If $c_1,\ldots,c_h$ are the orders of the conjugacy classes of $G$, then clearly
$n=c_1+c_2+\ldots+c_h$.
Let now $\pi_1,\ldots,\pi_h$ be the pairwise non-isomorphic, irreducible complex representations of $G$. It is well known that another partition of $n$ of length $h$ is given by the squares of the degrees $d_i$'s of the $\pi_i$'s:
$n=d_1^2+d_2^2+\ldots+d_h^2$.
Question: Assume that, up to reordering, the two partitions of $n$ described above are the same. Then what can we say about $G$? Is $G$ forced to be abelian?

REPLY [6 votes]: This is not an answer, but more of an extended comment. It seems that the first one to raise this question was E. Bannai Association schemes and fusion algebras. (An introduction), J. Algebr. Comb. 2, No. 4, 327-344 (1993). The motivation was to find examples of when a certain matrix attached to a group association scheme is unitary (which is the case for "naturally occuring" association schemes). This happens precisely when the irreducible characters and conjugacy classes of the finite group can be paired up such that the size of the conjugacy class is the square of the corresponding character degree.
On p. 341 Bannai mentions that M. Kiyota has proved (using the CFSG) that this property does not hold for any non-abelian simple group. This shouldn't be too hard; as Jim Humphreys has noted, the case of simple groups of Lie type follows from the existence of the Steinberg character, whose degree equals the order a Sylow $p$-subgroup, hence the square of its degree cannot divide the order of the group. For simple alternating groups, it is easy to find conjugacy classes which are not squares, and for the sporadic groups one can explicitly check whether the condition holds in each case.
Bannai also mentions that Kiyota "conjectures that $G$ must be nilpotent if the condition is satisfied", so Kevin Buzzard's question has been asked before.
An interesting development that gives some support to the conjecture that these groups are nilpotent is this paper:
Andrus, Ivan; Hegedűs, Pál; Okuyama, Tetsuro, Transposable character tables and group duality., Math. Proc. Camb. Philos. Soc. 157, No. 1, 31-44 (2014). ZBL1330.20007,
where it is shown that every transposable group is nilpotent. Transposable groups are finite groups $G$ whose character table has the property that its transpose (viewed as a matrix) is, up to multiplication by suitable diagonal integer matrices on each side, equal to the character table of some other finite group $G^T$. Moreover, $G$ is called self-dual if it is isomorphic to $G^T$ (there are other, equivalent, definitions). By definition, self-dual groups satisfy the condition that conjugacy class sizes are the squares of corresponding character degrees (i.e., that the two partitions in the OP agree). Thus, at least self-dual groups are nilpotent. However, I think there exist non-self-dual groups satisfying the condition that the two partitions agree, so in general Kiyota's conjecture seems to be open.