= Solution
By <Tonelli theorem> for the nonnegative indicators,
$$
\mathbb E[N]
=\mathbb E\left[\sum_{n\geq1}\mathbf1_{A_n}\right]
=\sum_{n\geq1}\mathbb P(A_n).
$$
If this is finite, then $N$ is finite almost surely: alternatively, <Markov inequality> gives
$$
\mathbb P(N\geq m)\leq\frac{\mathbb E[N]}m\longrightarrow0.
$$
Since $\{N=\infty\}\subseteq\{N\geq m\}$ for every $m$,
$$
\boxed{\mathbb P(N=\infty)=0}.
$$
This is the first <Borel-Cantelli lemmas>[Borel-Cantelli lemma].
Back to article page