For elements \(x\)  and \(y\)  in \(G\)  we write \(x \sim y\)  if \(x\)  is conjugate to \(y\) .
Let \(s \in G\) . We wish to give an expression for \(\nu _{s}(u^{q})\) . We need some notation.
Consider the set \(\mathcal {K} = \lbrace  (g_{1}, \ldots , g_{q}) \in G^{q} \mid g_{1} \cdots g_{q} \sim s \rbrace \) . There is a permutation \(\pi \)  acting on \(\mathcal {K}\)  by sending \((g_{1}, g_{2}, \ldots , g_{q}) \in \mathcal {K}\)  to \((g_{2}, \ldots , g_{q}, g_{1}) \in \mathcal {K}\) . Let \(t\)  be a positive divisor of \(q\) . Let the union of those \(\langle \pi \rangle \) -orbits on \(\mathcal {K}\)  which have lengths dividing \(t\)  be denoted by
\(\mathcal {K}_{t} = \lbrace  (g_{1}, \ldots , g_{q}) \in \mathcal {K} \mid g_{i+t} = g_{i} \ \mathrm {for \ every} \ i \ \mathrm {with} \ 1 \le i \le q-t \rbrace \) 
and let the union of orbits length \(t\)  on \(\mathcal {K}\)  be \(\mathcal {K}^{*}_{t}\) . Observe that \(\mathcal {K} = \mathcal {K}_{q}\)  and \(\mathcal {K}_{t} = \cup _{r \mid t} \mathcal {K}^{*}_{r}\) .
Write \(u=\sum _{g\in G}\alpha _gg\in \mathbb {Z}G\) . It is easy to see that
\(\nu _{s}(u^{q}) = \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}} \prod _{j=1}^{q} \alpha _{g_{j}} = \sum _{t \mid q} \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}^{*}_{t}} \prod _{j=1}^{q} \alpha _{g_{j}}.\) 
Since \(\mathcal {K}^{*}_{t}\)  is the union of all \(\langle \pi \rangle \) -orbits of length exactly \(t\) , the multiplicity of each summand in the sum \(\sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}^{*}_{t}} \prod _{j=1}^{q} \alpha _{g_{j}}\)  is divisible by \(t\) . Thus (REF ) provides
\(\begin{split}\nu _{s}(u^{q}) &\equiv \underset{p \nmid t}{\underset{t \mid q}{\sum }} \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}^{*}_{t}} \prod _{j=1}^{q} \alpha _{g_{j}} \equiv \underset{t \mid q^{\prime }}{\sum } \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}^{*}_{t}} \prod _{j=1}^{q} \alpha _{g_{j}} \\& \equiv \sum _{t \mid q^{\prime }} \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}^{*}_{t}} \Big ( \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}} \Big )^{m}\equiv \sum _{t \mid q^{\prime }} \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}^{*}_{t}} \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}}\pmod {p}.\end{split}\) 
If \(f_{1}\)  and \(f_{2}\)  are two functions from \(\mathbb {Z}\)  to \(\mathbb {Z}\)  such that \(f_{1}(t) = \sum _{r \mid t} f_{2}(r)\) , then   \(f_{2}(t) = \sum _{r \mid t} \mu (r) f_{1}(t/r)\) . This is the Möbius inversion formula (see [1]}).
For positive integers \(t\)  and \(r\) , put
\(f_{1}(t) = \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}_{t}} \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}}\quad \text{and}\quad f_{2}(r) = \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}^{*}_{r}} \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}}.\) 
The Möbius inversion formula then yields
\(\sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}^{*}_{t}} \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}} = \sum _{r \mid t} \mu (r) \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}_{t/r}} \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}}.\) 
Formulas (REF ) and (REF ) yield
\(\begin{split}\quad &\nu _{s}(u^{q}) \equiv \\&\equiv \underset{t \mid q^{\prime }}{\sum } \Big ( \sum _{r \mid t} \mu (r) \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}_{t/r}} \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}} \Big ) \equiv \underset{r \mid t \mid q^{\prime }}{\sum } \mu (r) \cdot \Big ( \sum _{(g_{1}, \ldots , g_{q}) \in \mathcal {K}_{t/r}} \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}} \Big ) \\&\equiv \underset{r \mid t \mid q^{\prime }}{\sum } \mu (r) \cdot \Big ( \underset{(g_{1} \cdots g_{t/r})^{{qr}/{t}} = (g_{1} \cdots g_{q^{\prime }})^{m} \sim s}{\underset{(g_{1}, \ldots , g_{q^{\prime }}) \in G^{q^{\prime }}}{\sum }} \prod _{j=1}^{q^{\prime }} \alpha _{g_{j}} \Big )\\&\equiv \underset{r \mid t \mid q^{\prime }}{\sum } \mu (r) \cdot \Big ( \underset{y^{{qr}/{t}} = x^{m} \sim s}{\underset{x^{G} , \ \exists y \in G:}{\sum }} \nu _{x}(u^{q^{\prime }}) \Big )\pmod {p}.\end{split}\) 
