Sifting function, generators of a cyclic group

53 Views Asked by At

i have a question about the generators of a cyclic group G :
I know the euler phi function gives the number of generators of G, but what about the indicator function of those ? (i.e. the function that would return 1 if g is a generator of G, 0 otherwise) I found that the expression of such a function would be $S(g) = \frac{\varphi(m)}{m}\left(1+\sum_{d\mid m, d>1}\frac{\mu(d)}{\varphi(d)} \sum_{ord\chi = d}\chi(g)\right)$ but i don't understand why
edit : where $\chi$ are the characters $G \longrightarrow \mathbb{C}^*$ and $\mu$ stands for the Möbius function