Showing convergence of this function defined by a series Let $f: [0,\infty) \to \mathbb{R}$ be continuous and define 
$$
f_n(x) = \sum_{j=0}^\infty f(j\cdot 2^{-n}) \mathbb{I}_{[j\cdot 2^{-n}, (j+1)\cdot 2^{-n})}(x). 
$$
I'd like to show pointwise (or uniform, if it exists) convergence of $f_n \to f$, but I'm having some trouble showing this. 
I've tried simply taking the limit of the $f_n$, but I'm not convinced I can interchange the limit and the series, and even if I can I don't see how this would help. I've also tried using the definition: Fix $x \in \mathbb{R}$ and let $\epsilon > 0$. I think I can use the continuity of $f$ here somehow to argue the existence of the $N \in \mathbb{N}$ such that $|f_n(x) - f(x)| < \epsilon$ for all $n \geq N$, but even drawing pictures doesn't seem to help me here.
This sequence of functions keeps coming up in texts I'm reading but the authors always seem to assume the convergence is obvious.   Maybe it is, but I'd appreciate a push in the right direction to see it for myself. 
 A: Remark: I wrote this up before the edit of the original question and thus assumed that the domain of $f$ is $\mathbb R$ and the summation of the series is over $j \in \mathbb Z$. It is straightforward though to modify these arguments to the case of domain $[0,\infty)$ and summation of $j \in \mathbb N$.
I will show the pointwise convergence:
Let $x \in \mathbb R$ and pick $\varepsilon > 0$, the by continuity of $f$, there exists $\delta > 0$ such that:
$$ |f(x) - f(y)| \leq \varepsilon \; \forall \; |x-y| \leq \delta $$
Furthermore observe that for fixed $n$:
$$ \mathbb R = \bigcup_{j \in \mathbb Z} [j\cdot 2^{-n}, (j+1)\cdot 2^{-n})$$
(In fact this union is disjoint). Thus for each $n$ pick (the unique) $j(n)$ such that $x\in [j(n)\cdot 2^{-n}, (j(n)+1)\cdot 2^{-n})$.
Then all terms but one of the series vanish, i.e. $f_n(x) = f(j(n)2^{-n})$.
Now you also pick $N\in\mathbb N$ such that $2^{-n} < \delta \; \forall \; n\geq N$. Then notice that:
$$|x - j(n)2^{-n}| \leq |(j(n)+1)2^{-n} - j(n)2^{-n}|=2^{-n} < \delta$$
Therefore we can finish the proof by our previous continuity argument:
$$ |f(x)-f_n(x)| = |f(x) - f(j(n)2^{-n})|\leq \varepsilon \; \forall \; n\geq N$$ 
Regarding uniform convergence, a sufficient condition is that $f$ is uniformly continuous (because then you can pick $\delta$ the same for all $x$ given $\varepsilon > 0$). It is also a necessary condition.
