Dirichlet function


In mathematics, the Dirichlet function is the indicator function of the set of rational numbers over the set of real numbers, i.e. for a real number if is a rational number and if is not a rational number.
It is named after the mathematician Peter Gustav Lejeune Dirichlet. It is an example of a pathological function which provides counterexamples to many situations.

Periodicity

For any real number and any positive rational number,. The Dirichlet function is therefore an example of a real periodic function which is not constant but whose set of periods, the set of rational numbers, is a dense subset of.