§27.10 Periodic Number-Theoretic Functions
If
is a fixed positive integer, then a number-theoretic function
is
periodic (mod
) if
Examples are the Dirichlet characters (mod
) and the greatest common
divisor
regarded as a function of
.
Every function periodic (mod
) can be expressed as a finite Fourier
series
of the form
where
is also periodic (mod
), and is given by
An example is Ramanujan’s sum:
where
is the principal character (mod
). This is the sum of the
th powers of the primitive
th roots of unity. It can also be expressed in
terms of the Möbius function as a divisor sum:
More generally, if
and
are arbitrary, then the sum
is a periodic function of
and has the finite Fourier-series
expansion
where
Another generalization of Ramanujan’s sum is the Gauss sum
associated with a Dirichlet character
. It
is defined by the relation
In particular,
.
is separable
for some
if
For any Dirichlet character
,
is separable
for
if
, and is separable for every
if and only if
whenever
. For a primitive character
,
is separable for every
, and
Conversely, if
is separable for every
, then
is
primitive (mod
).
The finite Fourier expansion of a primitive Dirichlet character
has the form

