derihlet function return 1 if the input is rational.
and 0 if the input is irrational.
prove that Dirichlet function is periodic
and prove that every rational number is its period
??
I think all that needs is the following observation:
For a fixed rational r,
1) Every rational can be written as sum of another rational and r, uniquely.
2) Every irrational can be written as sum of another irrational and r, uniquely.
f(x+r) = f(x) for all x, where f is the Dirichlet function.