Sequence of Functions Converging to 0 I encountered this question in a textbook. While I understand the intuition behind it I am not sure how to formally prove it.
Define the sequence of functions $(g_n)$ on $[0,1]$ to be $$g_{k,n}(x) = \begin{cases}1 & x \in \left[\dfrac{k}n, \dfrac{k+1}n\right]\\ 0 & \text{ else}\end{cases}$$
where $k \in \{0,1,2,\ldots,n-1\}$.
Prove the following statements:
1) $g_n \to 0$ with respect to the $L^2$ norm.
2) $g_n(x)$ doesn't converge to $0$ at any point in $[0,1]$.
3) There is a subsequence of $(g_n)$ that converges pointwise to $0$.
Thank you for your replies.
 A: The sequence is given by
$$f_{k,n}(x) = \begin{cases}1 & x \in \left[\dfrac{k}n, \dfrac{k+1}n\right]\\ 0 & \text{ else}\end{cases}$$
where $k \in \{0,1,2,\ldots,n-1\}$.
$1$). Note that $$\int_0^1 \vert f_{k,n} \vert^2 d \mu = \mu\left( \left[\dfrac{k}n, \dfrac{k+1}n\right]\right) = \dfrac1n \to 0 \text{ as }n \to \infty$$
$2$). Consider any $x \in [0,1]$. For any $n \in \mathbb{N}$, we have $x \in \left[\dfrac{k}n, \dfrac{k+1}n \right]$ for some $k = k_x(n)$. (Why?)
$3$). Consider the subsequence $f_{m,n}(x)$, where $m$ is a fixed number in $\{1,2,\ldots,n-2\}$.
EDIT
Adding more details to $2$ and $3$.
$2$). Choose $k_x(n) = \left \lfloor nx\right \rfloor$. By definition, we have $\left \lfloor nx\right \rfloor \leq nx \leq \left \lfloor nx\right \rfloor+1$. Hence, we get that$$\dfrac{\left \lfloor nx\right \rfloor}n \leq x \leq \dfrac{\left \lfloor nx\right \rfloor+1}n$$Hence, for a fixed $x$, if we look at the subsequence, $h_n(x) = f_{k_n(x),n}(x)$, we have $h_n(x) = 1$ for all $n$. Hence, we have subsequence of $f_{k,n}(x)$ converging to $1$.
$3$). Consider the sequence $$h_n(x) = f_{1,n}(x) = \begin{cases}1 & x \in \left[\dfrac1n, \dfrac2n \right]\\ 0 & \text{else}\end{cases}$$ Note that clearly $h_n(0) = 0$, since $0 < \dfrac1n$ for all $n$. Now for any other $x$, note that there exists a $N$ such that $\dfrac2N < x$. Beyond this $N$, for the given $x$, we have $h_n(x) = 0$ for all $n \geq N$. Hence, for any fixed point $x$, we have $$\lim_{n \to \infty} h_n(x) = 0$$
A: 1) What is $\lVert g_n\rVert_2$?
2) Show that for any $x$, $g_n(x)=0$ infinitely often and  $g_n(x)=1$ infinitely often.
3) Note that $\frac1n\to 0 $ and $\frac2n\to 0$
