To find the probability of the length of the longest head run not exceeding k:
Compute 2 to the power of n, where n is the total number of coin flips you perform.
Determine the n-th term of the (k+1)-step Fibonacci sequence.
Divide the number obtained in Step 2 by that from Step 1.
What you got is exactly the probability we've been looking for!
Read more