Flip 100 coins. What is a probability that you never get two heads in a row?

Let H(n) be the number of ways of flipping n coins in a row, never getting two heads in a row and ending with a head. Let T(n) be the number of ways of flipping n coins in a row, never getting two heads in a row and ending with a tail.

To start with:

H(1) = 1

T(1) = 1

H(2) = 1 (it can only by TH)

T(2) = 2 (can be HT or TT)

Let's establish some recurrences. First of all:

T(n+1) = T(n) + H(n)

since we can add a tail to any sequence ending with a head or a tail.

H(n+1) = T(n)

since we can only add a head to a sequence ending with a tail. Hence:

H(n+1) = T(n) = T(n-1) + H(n-1) = H(n) + H(n-1)

Together with H(1) = H(2) = 1, this establishes that H(n) is the nth Fibonacci number, so:

H(100) | = | F(100) / 2^{100} |

= | 316912650057057350374175801344 / 2^{100} |