  The longest stretch $L(n)$ of consecutive heads in $n$ i.i.d. coin tosses is
seen from the prism of large deviations. We first establish precise asymptotics
for the moment generating function of $L(n)$ and then show that there are
precisely two large deviation principles, one concerning the behavior of the
distribution of $L(n)$ near its nominal value $\log_{1/p} n$ and one away from
it. We discuss applications to inference and to logarithmic asymptotics of
functionals of $L(n)$.
