A coin is tossed $2m+1$ times, what is the probability of getting at least $m$ consecutive heads? I am stuck in this probability problem:

A coin is tossed $2m+1$ times, what is the probability of getting at least $m$ consecutive heads?

My attempt
For $r$ consecutive heads total ways $=2m+1-r+1=2m-r+2$
Total favorable ways $=\sum _{ r=m }^{ r=2m+1 }{ \left( 2m+2-r \right)  }$
I am not getting answer out of it .Please help
 A: Suppose for an outcome we have at least $m$ consecutive heads, starting from the $i^{th}$ position. Then $i$ can be any one of $1,2,\cdots,m+2\ (=2m+1-m+1)$. Starting from the $i^{th}$ position we know that $H$ is in the following positions $i,i+1,\cdots,i+m-1$. Also $T$ should be there at the $(i-1)^{th}$ position if $i>1$. The rest of the positions can be either $T$ or $H$.
So for $i=1$, there are $2^{2m+1-m}$ arrangements.
For $i=2,\cdots,m+1$, there are $2^{2m+1-(m+1)}$ arrangements.
For $i=m+2$, we have to exclude from our possible $2^{m}$ outcomes, the particular outcome where the first $m$ positions are all occupied by heads, because we have accounted for this case as $i=1$. So there are $2^{m}-1$ such outcomes with $i=m+2$.
Hence in total $2^{m+1}+(m+1)2^m-1$ outcomes where there are at least $m$ consecutive heads. The probability of each of the outcomes is $2^{-(2m+1)}$. Hence required probability is $$\frac{2^{m+1}+(m+1)2^m-1}{2^{2m+1}}$$
A: Hints:

*

*How many ways of tossing a coin $2m+1$ times?

*How many cases are there where the first $m$ are heads and the others anything?

*How many cases are there where the $n$th is tails and the next $m$ are heads and the others anything? What values can $n$ take?

*How many cases do the previous approaches double-count?

