Try this beautiful problem from the American Invitational Mathematics Examination I, AIME I, 1995 repeatedly flipping a fair coin.
Let p be the probability that, in the process of repeatedly flipping a fair coin, one will encounter a run of 5 heads before on encounters a run of 2 tails. Given that p can be written in the form \(\frac{m}{n}\), where m and n are relatively prime positive integers, find m+n.
Integers
Probability
Algebra
Answer: is 37.
AIME I, 1995, Question 15
Elementary Number Theory by David Burton
Let A be head flipped
B be tail flipped
outcomes are AAAAA, BAAAAA, BB. ABB, AABB, AAABB, AAAABB
with probabilities \(\frac{1}{32}\), \(\frac{1}{64}\), \(\frac{1}{4}\), \(\frac{1}{8}\), \(\frac{1}{16}\), \(\frac{1}{32}\), \(\frac{1}{64}\)
with five heads AAAAA, BAAAAA sum =\(\frac{3}{64}\) and sum of outcomes=\(\frac{34}{64}\)
or, m=3, n=34
or, m+n=37.