TITLE: Number of ways a group element of a finite group can be written as a given word
QUESTION [6 upvotes]: I had previously asked about the number of ways a group element in a finite group could be written as a commutator (the question is still open for a proof, by the way) In how many ways can a group element in a finite group be written as a commutator?
Let $G$ be a finite group. Suppose we have a word on $k$ letters and we want to write a given $g \in G$ using that word (for example, if $k=2$, we'd be looking at the number of ways $g$ can be written as a product, which should be $|G|$).
For the case where the word is a product of $m$ commutators (so that $k=2m$), the following procedure should give the number of ways we can write the identity element as that word:
Let $\delta$ be the regular character of $G$ and $w$ be the word (which is a product of $m$ commutators). So $\delta$ takes value $|G|$ at the identity and $0$ at every other element. So $\sum_{\vec{g} \in G^{2m}} \delta(w(\vec{g}))=|G| \gamma(w)$, where $\gamma(w)$ is the number of ways we can write the identity with $w$. So we are able to calculate $\gamma$(w).
If $w$ is a product of $m$ commutators, one may also prove that $\gamma(w)=|G|^{2m-1}\zeta(2m-2)$, where $\zeta$ is Witten's zeta function ($\zeta(k)=\sum_{\chi} \chi(1)^{-k}$, where the sum is taken over all irreducible characters).
Is it possible to get the number of ways to write a general element $g$, from this result for the identity (or an analogous method)? At least for the case where $w$ is a product of commutators?
Thank you very much!

REPLY [5 votes]: Nevermind, I've sorted it out. In the end you get that the number of ways you can write a group element $g$ with a word $w$ is given by $\sum_{\chi} \frac{\overline{\chi(g)}}{|G|} \sum_{\vec{g} \in G^n} \chi(w(\vec{g}))$. For that, just look at the class function $f$ that takes value $|G|$ at elements in the conjugacy class of $g$ and $0$ everywhere else (then do the analogous procedure). This is nice, since it also proves the statement I wanted to prove in the commutator question (by taking $w=[a,b]$).
Thanks anyways!