# Show $f'(x) = 0$ almost everywhere for $f(x) = \sum_{q_i < x} \frac{1}{2^i}$ over $(0,1)$ where $q$ is an enumeration of rational numbers.

Show $f'(x) = 0$ almost everywhere for $$f(x) = \sum_{q_i < x} \frac{1}{2^i}$$ over $(0,1)$ where $q$ is an enumeration of rational numbers.

I know, and can show, that $f(x)$ is increasing and discontinuous at all rational points within the domain of $f$. I have also reasoned out that for any irrational number $x$, that if the change in $x$, $(\delta x)$, is small enough, then we should be able to show that the rationals $r_i$ in the interval $(x, x + \delta x )$ will all have uniformly large denominators and therefore a uniformly large index $i$. I believe this should show that $f'(x) = 0$ almost anywhere. Can anyone help with the proof?

Thanks

Caution: it's not true that $f$ is differentiable at all irrational numbers.
Hint: Let $\epsilon > 0$ be given. Take suitable small intervals around each $q_i$, and show that for $x$ outside the union of these the difference quotients $(f(x+h)-f(x))/h$ will always be small. Make sure the measure of the union of your intervals is also small.