Two Heads in A Row: With Unequal Probability

The article will discuss the probability of obtaining two heads in a row in n tosses with heads and tails having different probablilities.

Derivation
to come soon...

$$P(n) = P(n-1) + (1-P(n-1))P(H) - (1-P(n-2) )P(H)P(T) $$ where P(H) is the probability of heads and P(T) is the probability of tails.

Thus:

$$P(n) = P(n-1) + (1-P(n-1))P(H) - (1-P(n-2) )P(H)(1-P(H)) $$