Flip coins until you get two heads in total, what's the probability that the number of total coins you flipped so far is equal to 4? 
You flip coins until you get two heads in total, what's the probability that the number of total coins you flipped so far is equal to $4$?

(It's an invalidated problem from a computer olympiad. And I don't know why it's invalidated.)
What I know:
So since you flip until you have a total of $2$ heads, your $n$'th flip should be a head, and in your first $n - 1$ flips you must have $1$ heads.
Then for $n \geq 2$
$\frac{n - 1}{2^{n - 1}} \cdot \frac{1}{2}$
That is $\frac{n-1}{2^n}$
I can see that $\sum_{n = 2}^{\infty}\frac{n-1}{2^n} = 1$.  But I don't know how to continue.
 A: Letting $N$ be the count of coins flipped until you obtain the second head.
You have that $\mathsf P(N=n)~=~\dfrac{n-1}{2^n}\mathbf 1_{n\in[[2..\infty)]}$
So, if you seek the probability the the number of coins you flip until the second head equals $4$, that is: $\mathsf P(N=4)$
However, if you seek to find $\mathsf P(N\geq 4)$, the number of coins flipped so far is 4 (ie that you have not stopped earlier)...$$\mathsf P(N\geq 4)~=~1-\mathsf P(N<4)\\=~~~~~$$
A: I agree to Graham Kemp that $\mathsf P(N=n)~=~\dfrac{n-1}{2^n}\mathbf 1_{n\in[2, ..., \infty)}$. But it asked for the probability that the number of total coins you flipped so far is $\underline{\textrm{equal}}$ to $4$. Therefore the required probability is
$$\mathsf P(N=4)~=~\dfrac{4-1}{2^4}=\frac3{16}$$
A: Another way of thinking about this is to just flip the coin exactly 4 times; we want the probability that the 4th of these 4 flips is the 2nd head. That is, the 4th flip should be heads and there should be exactly 1 head in the first 3 flips. There are 3 cases where this occurs, HTTH, THTH, and TTHH out of 16 possible sequences of four flips, so the answer is
$$\frac{3}{16}.$$
