PDE problem on $L^2$ convergence 
With $I \subset \Bbb{R}$, let $\chi_I$ denote the indicator function of I, $$\chi_I(x)=\begin{cases} 1 & \text{if x $\in$ I} \\ 0 & \text{otherwise} \end{cases}$$
  For any $k \in \Bbb{N}$, define $$g_{2^k+l}(x)= \chi_[\frac{1}{2^k},\frac{l+1}{2^k}](x)$$ for $l \in {0,...,,2^k-1}$. Show that ${g_n}^{\infty}_{n=1}$ converges to 0 in the $L^2$-sense on [0,1].

definition: the series converges in the mean-square (or $L^2$) sense to $f(x)$ in $(a,b)$ if $\int_{a}^{b} |f(x)- \sum_{n=1}^N f_n(x)|^2 dx \rightarrow 0$ as $N \rightarrow \infty$
So in this case $\int_0^1 |g(x)- \sum_{n=1}^{\infty}g_n(x)|^2 dx$, and I am trying to prove that they equal to 0, but I am stuck on how those operations would go.
 A: It is naturally to expect that a convergence of a sequence $\{g_n\}$ of functions on $[0,1]$ in $L_2$-sense to a function $g$
means a convergence with respect to $L_2$-metric, that is that $\sqrt{\int_0^1 |g_n(x)-g(x)|d\mu}$ (where $\mu$ is the Lebesgue measure on $[0,1]$) tends to zero when $n$ tends to the infinity. 
This doesn’t hold for the sequence $\{g_n\}$ from the question and the zero function $g$, because for each $k\in\Bbb N$ and $l=2^k-1$ we have $\int_0^1 |g_{2^k+l}(x)-g(x)|^2d\mu=1-2^{1-k}$. But if we define $g_{2^k+l}= \chi_\left[\frac{l}{2^k},\frac{l+1}{2^k}\right]$ (which looks more common then) we shall have  $\int_0^1 |g_{2^k+l}(x)-g(x)|^2d\mu=2^{-k}$, so $\{g_n\}$ will converge to $g$ with respect to $L_2$-metric. 
The convergence of a series $\sum_{n=1}^\infty f_n$ to a function $f$ means a convergence to $f$ of a sequence of partial sums $\sum_{n=1}^N f_n$. The series  $\sum_{n=1}^\infty g_n$ does not converges to the zero function $g$ with respect to $L_2$-metric, because  all functions $g_n$ are non-negative so for each natural $N$ we have 
$$\int_0^1\left|\sum_{n=1}^\infty g_n(x)-g(x)\right |d\mu\ge  \int_0^1\left|g_1(x)-g(x)\right |d\mu>0.$$
