MathDB
probability sequence of sums of heads contains n in heads or tails

Source: 1984 Polish MO Finals p4

February 25, 2020
probabilityCoinrecurrence relationSumSequence

Problem Statement

A coin is tossed nn times, and the outcome is written in the form (a1,a2,...,ana_1,a_2,...,a_n), where ai=1a_i = 1 or 22 depending on whether the result of the ii-th toss is the head or the tail, respectively. Set bj=a1+a2+...+ajb_j = a_1 +a_2 +...+a_j for j=1,2,...,nj = 1,2,...,n, and let p(n)p(n) be the probability that the sequence b1,b2,...,bnb_1,b_2,...,b_n contains the number nn. Express p(n)p(n) in terms of p(n1)p(n-1) and p(n2)p(n-2).