Thomae function
From specialfunctionswiki
Thomae's function is given by the formula $$f(x) =\begin{cases} 1 & \text{if } x= 0 \\ \tfrac1{q} & \text{if } x = \tfrac{p}{q}\\ 0 & \text{if } x \in \mathbb{R}-\mathbb{Q}. \end{cases}$$
Properties
Theorem: The Thomae function is continuous at all irrational numbers and discontinuous at all rational numbers.
Proof: █
Theorem: The Thomae function has a (strict) local maximum at each rational number.
Proof: █