WOLFRAM|DEMONSTRATIONS PROJECT

The Modified Dirichlet Function

​
maximum denominator
20
choose
graph
spikes
triangles
This modified Dirichlet function has many names: Thomae, Riemann, popcorn, raindrop, ruler. It is defined on the closed interval
[0,1]
to be
1/q
at reduced rationals
p/q
and
0
elsewhere. It has the curious property that it is continuous on the irrationals but discontinuous at every rational in
(0,1)
.
In contrast, the Dirichlet function (not shown here) is defined to be
1
on the rationals and
0
on the irrationals. It is discontinuous everywhere and its dull graph consists of two blurry lines.