Let

For $n\in \mathbb{N}$ and $k\in \{0, 1, 2, ..., 2^{n}-1 \}$ is defined

$$I_{k}^{n}=\left[\frac{k}{2^{n}}, \frac{k+1}{2^{n}}\right)$$

and $f_{n}:[0, 1) \rightarrow \mathbb{R}$ is defined by

$$f_{n}(x)=\sum_{k=0}^{2^{n}-1} \frac{k}{2^{n}}1_{I_{k}^{n}}(x)$$

Where for $A\subseteq \mathbb{R}$, the function $1_{A}$ is the characteristic of $A$ such that $1_{A}(x)=1$ if $x\in A$ and $1 _{A}(x)=0$ if $x\notin A$.

The idea is to prove that $f_n \rightarrow f$ in $[0, 1)$. So, let's fix $x_0 \in [0, 1)$. We need to show by definition that

$$ \lim_{{n \to \infty}} f_n(x_0) = f(x_0) = x_0. $$

Given $\epsilon > 0$, we must find $n_0 \in \mathbb{N}$ such that if $n \geq n_0$, then

$$ \left| \sum_{{k=0}}^{{2^n-1}} \frac{k}{2^n}1_{I_k^n}(x_0) - x_0 \right| < \epsilon. $$

Now, let's consider this by cases:

If $x_0 = 0$, then

$$ \lim_{{n \to \infty}} f_n(x_0) = \lim_{{n \to \infty}} \sum_{{k=0}}^{{2^n-1}} \frac{k}{2^n}1_{I_k^n}(x_0) = 0 = x_0. $$

So,

$$\left| \sum_{{k=0}}^{{2^n-1}} \frac{k}{2^n}1_{I_k^n}(x_0) - x_0 \right| = 0 < \epsilon. $$ And for any choice of $n_{0}$ it would be enough.

Now, I am unable to determine this limit for $0 < x < 1$. The behavior of the sequence of functions in that interval is somewhat unusual. I attempted to find some values in that interval, as described in the following image:

I don't see how to determine the limit of $f_{n}$ at those points, any suggestions? I appreciate it!