Solution (source code)

= Solution

Write $G(s)=\mathbb E[s^F]$. The initial possibilities are $H$ with probability $1/2$, after which a fresh wait begins; $TH$ with probability $1/4$, after which a fresh wait begins; or $TT$ with probability $1/4$, which ends the experiment. Accounting for the flips already made in each case gives the <probability generating function> equation
$$
G(s)=\frac s2G(s)+\frac{s^2}4G(s)+\frac{s^2}4=\frac{(2s+s^2)G(s)+s^2}{4}.
$$
Therefore \b[$\displaystyle G_F(s)=\frac{s^2}{4-2s-s^2}$] for $0\leq s\leq1$. In particular, $G_F(1)=1$ and there is no mass below two flips, as required.