Counting the exact number of coin tosses This is a question that has received various answers. This questions seems simple, but it proves to be rather tricky.  So :
We flip a coin (H-T) independently $10$ times. Let's for the moment not care about whether it is fair or not. 
How many $3$-head sequences are there?
Solution:
Some say that the answer is $\displaystyle\frac{10!}{7!3!}$, but this is the number of ways  by which $3$ heads can be arranged in $10$ positions. This answer , however, does not say anything about the remaining $7$ positions. 
Each of these seven positions can be H or T. The total number of $7$-element sequences is $1\cdot1\cdot1\cdot2^7=2^7$. Then we have to multiply this by $\displaystyle\frac{10!}{7!3!}$ as the three heads can be anywhere.
But I have found that this is not the correct answer. The correct is just $\displaystyle\frac{10!}{7!3!}$. So why not multiply by $2^7$?
 A: 
Disclaimer: This is, so far, one of my most downvoted answers on the site. Needless to say, it is perfectly correct, and it answers the question as formulated at the time. I guess one should consider such erratic downvotes as an inherent part of the math.SE experience... Happy reading!

One wants to compute the number $N(n)$ of words of length $n$ in the alphabet $\{h,t\}$ containing the subword $hhh$, for $n=10$.
Consider the place where the first occurrence of $hhh$ in such a word, ends. The part of the word after this can be any word of the corresponding length. Likewise, the letter immediately before $hhh$, if any, must be $t$ and the part of the word before this $t$, if any, can be any word of the corresponding length without $hhh$. 
Thus, one can decompose
$N(10)$ into the sum 
$$
2^7+2^6+2^5\cdot2+2^4\cdot2^2+2^3\cdot(2^3-1)+2^2\cdot(2^4-N(4))+2^1\cdot(2^5-N(5))+2^6-N(6)
$$ 
that is, 
$$
N(10)=576-8-4N(4)-2N(5)-N(6)
$$
Similarly, $N(4)$ enumerates the words $hhh-$ and $thhh$ hence $N(4)=2+1=3$, $N(5)$ enumerates the words $hhh--$, $thhh-$ and $-thhh$ hence $N(5)=4+2+2=8$, and $N(6)$ enumerates the words $hhh---$, $thhh--$, $-thhh-$ and $--thhh$ hence $N(6)=8+4+4+4=20$. Finally, 
$$
N(10)=576-56=520
$$
More generally, one can show that 
$$
\sum_{n\geqslant3}N(n)t^n=\frac{t^3}{(1-2t)(1-t-t^2-t^3)}
$$ whose expansion starts as 
$$
t^3+3 t^4+8 t^5+20 t^6+47 t^7+107 t^8+238 t^9+520 t^{10}+1121 t^{11}+2391 t^{12}+5056 t^{13}+O(t^{14})
$$ hence, for example, 
$$
N(12)=2391
$$
An explicit formula, but with a finite summation, valid for every $N(n)$, is $$N(n+3)=2^n\sum_{i\geqslant0}\sum_{j\geqslant0}\sum_{k\geqslant0} \frac1{2^{i+2j+3k}}\frac{(i+j+k)!}{i!\,j!\,k!}\mathbf 1_{i+2j+3k\leqslant n}$$
