Consider the sequence of random variables $(X_n)_{n \in \mathbb{N}}$ on the probability space $((0,1],\mathcal{B}((0,1]))$ defined by $$\begin{align*} X_1(\omega) &:= 1_{\big(\frac{1}{2},1 \big]}(\omega) \\ X_2(\omega) &:= 1_{\big(0, \frac{1}{2}\big]}(\omega) \\ X_3(\omega) &:= 1_{\big(\frac{3}{4},1 \big]}(\omega) \\ X_4(\omega) &:= 1_{\big(\frac{1}{2},\frac{3}{4} \big]}(\omega)\\ &\vdots \end{align*}$$
I need to show whether this sequence converges in $L^1$ and a.s. but I am not sure about what $X_5$, $X_6$, $X_7$ ...looks like. Can you help me?
It is impossible to say for sure what $X_5,X_6...$ are, but this looks like a standard example of sequence which convreges in measure but not almost surely. So my guess is $(X_n)$ is the sequence obtained by arranging the functions $I_{[\frac {i-1} {2^{n}},\frac i {2^{n}})}$ in sequence with increasing order of the denominator $2^{n}$ and increasing order of $i$ within each block. In that case $EX_n$ is the sequence $(\frac 1 2,\frac 1 2, \frac 1 4,\frac 1 4 ,\frac 1 4,\frac 1 4,...)$ where $\frac 1 {2^{n}}$ is repeated $2^{n}$ times. Hence $EX_n \to 0$ which means $X_n \to 0$ in $L^{1}$. The sequence does not converge almost surely because, at every point, there are infinitely many $0$'s and $1$'s.