If are the increasing selected integers in the Cramér model, then almost surely . A zero block of length after has summable probability, so the Borel-Cantelli first lemma excludes these blocks eventually.
The event that infinitely many occur is . For every , the union bound and monotonicity of a probability measure give
The right-hand side tends to zero as the tail of a convergent series. Therefore the first Borel-Cantelli conclusion is
This proves the Borel-Cantelli first lemma without any independence assumption.
First, the Cramér model has infinitely many successes almost surely, so every is finite. Indeed, for each fixed , independence of the Bernoulli random variables gives
The sum diverges, for example because for . Continuity from above of a measure and a countable union bound exclude a final success.
Fix and put . Let be the event that the whole interval consists of failures. By independence and ,
Since , the exponent divided by tends to . Thus for all sufficiently large . The Borel-Cantelli first lemma shows that almost surely every sufficiently large such interval contains a success. Taking then gives for all sufficiently large .
For each fixed , the limit superior of the normalized gap is therefore at most almost surely. Intersect the probability-one events for , , to obtain the Cramér model prime-gap upper bound:
For the simple symmetric random walk, independence and the Rademacher distribution give the moment-generating function
The function is even; for its derivative is , since the derivative of is at most one and . Here and are the hyperbolic cosine and hyperbolic tangent. Hence the exponential-moment estimate is
The supplied exponential maximal bound for a symmetric random walk now gives . For , choose ; for , use the elementary bound by one. Thus
Fix , choose , and set . For large these form an increasing sequence. Apply the preceding exponential maximal bound for a symmetric random walk at with threshold . The resulting probability is at most
We have and . Choose strictly between and ; the displayed probabilities are . By the Borel-Cantelli first lemma, almost surely, eventually . For every , monotonicity of for large therefore gives
Intersect the probability-one events for to obtain the upper law of the iterated logarithm:
For a simple symmetric random walk, geometric blocking and the Borel-Cantelli first lemma yield the upper estimate almost surely. Equality requires a separate lower-bound argument.