Let $ \{r_n\}$ be an enumeration of the set of rational numbers such that $ r_n\neq r_m $ if $n\neq m $ define $ f :\Bbb R \to \Bbb R $ by $ f(x) =\sum_{r_n \leq x} $ $1/2^{n} x \in \Bbb R $
Prove that $f$ is continuous at each point of $\Bbb Q^{c} $ and discontinuous at each point of $ \Bbb Q $
I couldn't first understand the function and had little idea on proving either continuity or discontinuity