Find function $f\colon[0,1]\to \mathbb R$, whose set of discontinuities is such that
$$\left\{\frac{k}{2^n}; \quad k,n \in \mathbb N, k \le 2^n\right \}$$
I guess that it is Riemann function or something like that but I have no clue how it would look like
Let $f(x) = 0$ whenever $x$ is not a dyadic fraction, and $f\left(\frac{k}{2^n}\right) = 2^{-n}$.