TITLE: The Typewriter Sequence
QUESTION [17 upvotes]: The typewriter sequence is an example of a sequence which converges to zero in measure but does not converge to zero a.e.
Could someone explain why it does not converge to zero a.e.?
Note: the typewriter sequence (Example 4).

REPLY [2 votes]: I wrote this sequence of functions as a counterexample for a question that was deleted.
$$
f_n(x)=\left[\frac km\le x\lt\frac{k+1}m\right]
$$
where $[\dots]$ are Iverson brackets, $m=\left\lfloor\frac{1+\sqrt{1+8n}}2\right\rfloor$ and $k=n-\frac{m(m-1)}2$.
The Typewriter Sequence is a subsequence of this sequence (when $m$ is a power of $2$). Like the Typewriter Sequence, this sequence does not tend to $0$ pointwise, but its $L^1$ norms vanish.