Flips until the pattern heads-tails-heads appears
You flip a fair coin and watch the running sequence of outcomes. You stop the first time the last three flips spell out H, T, H in that order.
On average, how many flips does it take for the pattern HTH to first appear?