An exercise taken from Klenke: Let $f \in L^1(\lambda)$, where $\lambda$ is the restriction of the Lebesgue measure to $[0,1]$. Let $I_{n,k} = [k2^{-n},(k+1)2^{-n}), $ for $n \in \mathbb{N}$ and $k = 0,...,2^{n}-1$. Define $f_n:[0,1]\to \mathbb{R}$ by $$ f_n(x)=2^n\int_{I_{k,n}} f d\lambda$$ if k is chosen such that $x \in I_{k,n}$. Show that $\lim_{n\to \infty} f_n(x) = f(x)$ almost surely for $x \in [0,1]$.
But I'm not sure about here $$\lim_n f_n(x) = \lim_n 2^n\int_{k2^{-n}}^{(k+1)2^{-n}} f d\lambda...$$ since $\lim 2^n=0$? If we remove it then perhaps it makes sense below:
i.e. Say $\int_0^1f(x) dx=\int_{I_{k,n}}f \mathop{}\!d \lambda $, therefore $$ \lim_{n \to \infty}\int_0 ^1f(x) dx=\lim_{n \to \infty}\int_{I_{k,n}}f \mathop{}\!d \lambda \tag1 $$ Now as $\{I_{k,n}f\}$ is a family of non-negative functions, then the monotone convergence theorem yields
$$ \int_{[0,1]} f\mathop{}\!d \lambda =\lim_{n \to \infty}\int_{I_{k,n}}f \mathop{}\!d \lambda \tag2 $$
Then from $(1)$ and $(2)$ we have that $$ \int_{[0,1]} f\mathop{}\!d \lambda =\lim_{n \to \infty}\int_{k2^{-n}}^{(k+1)2^{-n}}f(x) \mathop{}\!d x\tag3 $$ So $f\in L^1$ if and only if $\lim_{n\to \infty}\int_{k2^{-n}}^{(k+1)2^{-n}}f(x) \mathop{}\!d x$ converges.