This may seem like a straightforward probability question but it becomes complicated quickly. I have tried a lot of paths to a solution and would appreciate your help. It is not for school or work.
I flip a coin. If it's heads, I win. But if it's tails, then I need two heads in a row to win. If I then flip another tails, at any time before winning, then I need three heads in a row to win, and so on. The number of heads I need to win is always T+1, where T is the cumulative number of tails flipped during the game. I want to find the overall probability of winning. It is easy to do so numerically. The answer is about 71%. But I want an exact expression, a recursive function to sum the series of probabilities over infinite flips. I imagine it's an infinite recursive product but I've yet to find an answer. Any help would be infinitely appreciated.
Let $q$ the probability of getting head, $T_k$ be the time that the $k-$th tail appears and $N$ be the number of tails that appears before the win. The probability of winning in a finite time is
\begin{align} P[N < \infty] &= 1 - \lim\limits_{n\to \infty} P[N\ge n]\\ &= 1 -\lim\limits_{n\to\infty}P\left[\bigcap\limits_{k=1}^{n} \left\{T_{k} - T_{k-1} < k + 1\right\}\right]\\ &= 1 - \lim_{n\to\infty} \prod_{k=1}^n \left(1-q^{k}\right)\\ &= 1 - \prod_{k=1}^\infty \left(1-q^k\right) \end{align}