4.3.3 problem 40

Let be the indicator random variable for HTH pattern starting on the -th toss. Since the tosses are independent, for .

Let be the number of HTH patterns in independent coin tosses. Then,