Compute the number of primitive Dirichlet characters modulo

:
Define generalized Bernoulli numbers from
DirichletCharacter:
Compute values at negative integers of
DirichletL using generalized Bernoulli numbers:
The generalized Bernoulli number at 0 of a principal character is

and zero otherwise:
Dirichlet characters modulo

form a group:
For primitive characters modulo

,

are zero at values not coprime to

:
For primitive characters modulo

, absolute values of Gauss sums are equal to

:
Find conductors of Dirichlet characters modulo

with

an odd prime power: