Quote:
Originally Posted by Nick
How many ways are there of throwing \(kN\) times without getting \(N\) heads in a row? What is the probability of each of those possibilities followed by \(N\) consecutive heads?

Not quite right, either. The \(kN\) might have ended with one or more heads. I usually grab the density using the transition matrix for the Markov Chain of #heads in a row with an absorbing state at \(N\), but this question asks for the mean.
I'd try an inductive approach on the number of heads. To get one head in a row, the first toss is a head with probability p or a tail with probability (1p). If heads, you are done. If tails, you need the to start over. So
X1 = p*1 + (1p)*(X1+1)
X1 = 1/p
For k in a row, you need k1 in a row, then one more toss either finishes it or starts it over.
Xk = p*(X(k1)+1) + (1p)(Xk+X(k1)+1)
Xk = X(k1)/p + 1/p
The logic of the last equation is conditioned on the results of the flip after first achieving k1 heads.
Check that arithmetic  I fixed several errors before posting and might still have some left  but the logic is solid.