A coin is tossed 7 times. The probability that at least 4 consecutive heads appear is? 
A coin is tossed 7 times. The probability that at least 4
  consecutive heads appear is?

I have checked and double checked but I can't figure out which cases I am missing. 
Here are the cases: 


*

*4 consecutive heads appear:
$n_1 = \dfrac{4!}{3!}= 4$


*5 heads appear
Subcase 1: 4 consecutive heads appear and the other head is separated.
For example: HTTHHHH or THTHHHH 
Subcase 1 has $4$ possibilities. 
Subcase 2: 5 consecutive heads: 
$\dfrac{3!}{2!} = 3$ 
$n_2 = 4+ 3 = 7$


*6 heads appear
There are 6 gaps (including the ends) where we can place the $T$
Let me show those places by G: 
GHGHGHHGHGHG
$n_3 = 6$


*All heads appear
$n_4 = 1$ 
$P(\text{4 consecutive heads}) = \dfrac{n_1+ n_2+ n_3 + n_4}{2^7}  = \dfrac{18}{2^7} = \dfrac{9}{64}$
Please let me know my mistake. 
 A: The component of $n_2$ counting the ways that five heads appear, one of which is separated from the other four, should be 6 rather than 4:
$$\text{HTTHHHH THTHHHH}\\
\text{HTHHHHT THHHHTH}\\
\text{HHHHTTH HHHHTHT}$$
Thus the probability is $\frac{20}{2^7}=\frac5{32}$.
A: Here is an alternative approach.  Consider the complementary problem: What is the probability that no sequence HHHH appears in the 7 tosses?
There are $2^7$ possible sequences of seven H/T's, each of which we assume is equally likely.  We would like to count the number of sequences which do not contain the pattern HHHH.  Let's say $a_{n,i}$ is the number of acceptable sequences of length $n$ that end in a string of $i$ heads, for $n=1,2,3, \dots ,7$ and $i=0,1,2,3$.  It is clear that $a_{1,0} = a_{1,1} = 1$ and $a_{1,2} = a_{1,3} = 0$. For $n > 1$, a sequence ending in zero H's can always be obtained by adding a T to any sequence of length $n-1$,
so 
$$a_{n,0} = a_{n-1,0} + a_{n-1,1} + a_{n-1,2} + a_{n-1,3}$$
For $i >0$, a sequence ending in $i$ H's can only be obtained by adding an H to a sequence ending in $i-1$ H's, so
$$a_{n,i} = a_{n-1,i-1}$$
for $i=1,2,3$.  These conditions suffice to compute $a_{n,i}$ for $n$ as large as we like,recursively.  
We find $a_{7,0} = 56$, $a_{7,1} = 29$,$a_{7,2} = 15$, and $a_{7,3} = 8$, so the total number of acceptable sequences of length 7 is $56+29+15+8=108$.  Therefore the probability of a sequence of 7 H/T's not containing the pattern HHHH is $108/2^7$, and the probability that a sequence does contain the pattern HHHH is 
$$1-\frac{108}{2^7}=\frac{20}{2^7}$$
A: I would split cases in the following way:
1) Exactly 4 consecutive heads: HHHHTxy, THHHHTx, xyTHHHH, => ten possibilites
2) Exactly 5 consecutive heads: HHHHHTx, THHHHT, xTHHHH => five possibilities
3) Exactly 6 consecutive heads: two possibilities, as the 7th flip must be T
4) Exactly 7 consecutive heads: one possibility
In total 18 possibilities.
