... If within n coin tosses, no two consecutive heads turn up, the first gambler wins.
(a) What value of n should the second gambler insist on to have more than a 50% chance of winning? [Two consecutive heads means 2nd gambler wins.]
You need at least 5 coin flips to get a greater than 50% chance of a specific outcome.
HH, TT, HT, TH = 25% chance of two heads; one way for #2 to win, three ways for #2 to lose.
A third toss gives you:
HHH, HHT, HTH, HTT, THH, THT, TTH, TTT
In binary:
0 – 000
1 – 001
2 – 010
3 – 011
4 – 100
5 – 101
6 – 110
7 – 111
A fourth toss gives you:
HHHH, HHHT, HHTH, HHTT, HTHH, HTHT, HTTH, HTTT
THHH, THHT, THTH, THTT, TTHH, TTHT, TTTH, TTTT
In binary:
0 – 0000
1 – 0001
2 – 0010
3 – 0011
4 – 0100
5 – 0101
6 – 0110
7 – 0111
8 – 1000
9 – 1001
A – 1010
B – 1011
C – 1100
D – 1101
E – 1110
F – 1111
- Eight ways to win, eight ways to lose, 50/50.
A fifth toss gives you:
HHHHH, HHHHT, HHHTH, HHHTT, HHTHH, HHTHT, HHTTH, HHTTT
HTHHH, HTHHT, HTHTH, HTHTT, HTTHH, HTTHT, THTTH, HTTTT
THHHH, THHHT, THHTH, THHTT, THTHH, THTHT, THTTH, THTTT
TTHHH, TTHHT, TTHTH, TTHTT, TTTHH, TTTHT, TTTTH, TTTTT
In binary:
0 – 00000
1 – 00001
2 – 00010
3 – 00011
4 – 00100
5 – 00101
6 – 00110
7 – 00111
8 – 01000
9 – 01001
A – 01010
B – 01011
C – 01100
D – 01101
E – 01110
F – 01111
10 – 10000
11 – 10001
12 – 10010
13 – 10011
14 – 10100
15 – 10101
16 – 10110
17 – 10111
18 – 11000
19 – 11001
1A – 11010
1B – 11011
1C – 11100
1D – 11101
1E – 11110
1F – 11111
With 5 tosses there's 19 chances out of 32 to win, 19 / 32 = 59.375%.
With 6 tosses there's 42 chances out of 64 to win, 42 / 64 = 65.625%.
(b) In general, let P(n) denote the probability that two consecutive heads show up within n trials. Write a recurrence relation for P(n).
See "Which number will follow" for an analysis of this recursive function.

(c) Implicit in the second gambler’s stand is the claim that for all sufficiently large n, there is a good chance of getting two consecutive heads in n trials; i.e. P(n)>1/2. In the first part of this question, once such n has been demonstrated. What happens for larger values of n? Is it true that P(n) only increases with n? Justify your answer.
More flips increase #2's success rate, though it is possible to get two heads with two flips. That's clearly demonstrated above.
More complicated analyses are:
coin tossed until two consecutive heads or tails appear
Flip a fair coin until three consecutive heads or tails appear
Use combination and Markov chains to solve for a greater number of consecutive results.