For n≥3, if the last outcome is T, then the probability that the first (n−1) tosses do not contain two (or more consecutive heads is pn−1 and if the last outcome is H, then (n−1)th outcome must be T and the probability the first (n−2) tosses do not contain two (or more) consecutive heads is pn−2. Hence,
pn=pn−1×P (nth toss results in a tail)+pn−2×P (nth toss results in a head and (n−1)th toss results in a tail)
=(1−p)pn−1+p(1−p)pn−2
A) When n=1, then two possible outcomes viz. H and T satisfy the condition that two (or more consecutive heads do not occur. Thus, p1=1.
B) When n=2m the possible outcomes are HH,HT,TH and TT. Out of these, first outcome viz. HH does not satisfy the condition that no two (or more) consecutive heads occur. Thus,
p2=1−P(HH)=1−pp=1−p2.
C) p3=(1−p)p2+p(1−p)p1=(1−p)(1−p2)+p(1−p)1=1−2p2+p3
D) pn=(1−p)pn−1+p(1−p)pn−2