Rare-jump martingale divergence (source code)

= Rare-jump martingale divergence
{title2=$X_n=\sum_{k=1}^n(1-2^kY_k)$}

A <martingale> can diverge to $+\infty$ <almost surely> when its increments are finite but not uniformly bounded. For independent <Bernoulli random variables> with $\mathbb P(Y_n=1)=2^{-n}$,
$$
X_n=\sum_{k=1}^n(1-2^kY_k)
$$
has centered integrable increments. The <First Borel-Cantelli lemma> makes the rare negative jumps occur only finitely often, after which every increment equals one. The expectation remains zero at every finite time despite this pathwise divergence.