Probability of at least m in a row out of n? (generic formula) In a previously asked question of mine, I was specific in asking for a 75% freethrow shooter, what is the probability he would make at least 5 freethrow shots in a row out of 10.  That means he would have to make 5, 6, 7, 8, 9, or all 10 in a row in one big streak (not in little chunks).  That is, I was interested in the longest make streak being of length 5 or greater.   It was assumed his freethrow % was "locked" at 75% during the 10 freethrows.  The answer reduced to a very nice compact $6p^5 - 5p^6$ which is equivalent to $p^5 (6 - 5p)$.  The formula is flexible enough to allow any value of p from 0 to 1, however, it seems "tied" to the numbers 5 and 10 since I originally asked for at least 5 in a row out of 10.
I am looking for a generic formula I can use on this same type of word problem but allowing me to change both the 5 and 10 (or more generically speaking, m and n).
So far I know the following:
for 5+ in a row out of 10 I got $6p^5 - 5p^6  = p^5 (6-5p)$
for 6+ in a row out of 10 I got $5p^6 - 4p^7  = p^6 (5-4p)$
for 7+ in a row out of 10 I got $4p^7 - 3p^8  = p^7 (4-3p)$
for 8+ in a row out of 10 I got $3p^8 - 2p^9  = p^8 (3-2p)$  
for exactly 5 in a row out of 10 I got $6p^5 - 10p^6 + 4p^7$ = $p^5 (6 - 10p + 4p^2)$
for exactly 6 in a row out of 10 I got $5p^6 - 8p^7 + 3p^8$  = $p^6 (5 - 8p + 3p^2)$
for exactly 7 in a row out of 10 I got $4p^7 - 6p^8 + 2p^9$ = $p^7 (4 - 6p + 2p^2)$
and so on (the pattern is visible).
Also FYI, the answer to the original question with p=$0.75$, m=$5$+ in a row and n=$10$ is $2187/4096$ = $53.4$% so you can use that to check your more generic formula(s).
9+ and 10+ follow the same pattern but I am having trouble formatting them here.  I did not compute 4+ 3+ 2+ and 1+ but I would assume they would follow similar patterns.
Can someone come up with a generic formula for P(at least m in a row, 10) for this problem where m can range from 1 to 10?
Then I would like a general formula (if possible) so that I don't have to fix n to always be 10, rather it could be any number greater than or equal to m such as at least 5 out of 20, at least 10 out of 20...  Remember p has to be flexible too such as 0.5 (50%), 0.75 (75%)...
Thanks!
 A: Let $P_m(n)$ be the probability of a run of $m$ or more out of $n$ trials. We have then $P_m(n)=0$ when $n<m$ [not enough trials for a run of $m$]. If $p$ is the success and $q=1-p$ the failure probability, then we also have $P_m(m)=p^m$ since here to get the run of $m$ all the $m$ trials must be success. Another easy case (which is necessary to include for a recursion later) is that $P_m(m+1)=p^m+qp^m,$ since here we either have a run of $m$ starting at the first trial, or else a failure on the first trial followed by $m$ success. Note that in any figuring of a run of $m$ or more, ignoring issues of double counting the probability is $p^m$ no matter where one starts, since after getting the first $m$ in a row one doesn't care what happens after that.
Now assume $n \ge m+2.$ Then in order to count each possibility once only, we consider that the first run of $m$ or more must start at one of positions $k=1,2,\cdots n-m+1.$ (The greatest start position here is when our run happens to be of length $m$ and starts in the last position it could.) When $k=1,2$ we have respectively $p^m$ and $qp^m$, while for $3 \le k \le n-m+1$ we need a failure at position $k-1$ followed by a run of $m$ or more starting at position $k,$ but we also need to require that there be no run of $m$ or more in the initial part $1,2,\cdots,k-2$ of the sequence, to avoid a double count. That's where the recursion comes in, because the likelihood of no such initial run is $1-P_m(k-2).$ By these arguments, when $n\ge m+2$ the recursion is
$$P_m(n)=p^m+qp^m+\sum_{k=3}^{n-m+1}(1-P_m(k-2))\cdot qp^m.$$
I checked this tallies with the simple case of $P_1(n)=1-q^n.$ For $P_2(n)$ it starts giving complicated results as soon as $n=5$ when the recursion first "kicks in" nontrivially. [Generally for a larger $m$ there are several initial terms wherein the factor $(1-P_m(k-2))$ is simply $1$.] 
I realize this answer may be unsatisfactory since it involoves a recursion. However I at least would be surprised by an actual closed form for the general value of $P_m(n).$
