Generating function: Probability regarding coin toss 
If a coin is flipped 25 times with eight tails occurring, what is the probability that no run of six (or more) consecutive heads occur?

Wasn't sure how to approach this and am quite positive my generating function is incorrect. My attempted work:

Consider $e_H,e_T$ s.t $e_H$ denotes the number of times our coin lands on heads and $e_T$ is the number of times our coin lands on tails. We want the number of integer solutions to: 
  $$e_H+e_T=25$$
  where $e_H \in [9,25]$ and $e_T=8$. It follows that our generating function $h$ is
  $$h(x)=(x^9+x^{10}+...x^{25})x^8$$
  where we want to find the coefficient of $x^{25}$.
Now, observe that $h$ can re-written as
  $$h(x)=x^{17}(1+x+...x^{16})$$
  where we want to find the coefficient of $x^{16}$ now. Using the formula for finite geometric series, we see that $h$ becomes 
  $$h(x)=x^{17}(\frac{1-x^{17}}{1-x})$$
  $$=x^{17}(1-x^{17})(\frac{1}{1-x})$$
  where using the formula for infinite geometric series gives us
  $$x^{17}(1-x^{17})(1+x+...+x^n+...)$$
  Finally, using the formula $h(x)=f(x)g(x)=c_0 + c_1x+...+c_rx^r+...$ where $c_r=a_0b_r+a_1b_{r-1}+...a_rb_0$, we find 
  $$f(x)=(1-x^{17}),g(x)=(1+x+...)$$
  $$\implies a_0b_16=1*1=1$$
  so it follows that the coefficient attached to $x^{16}$ is 1.

Can someone help lead me down the right path? If my work is actually correct, where do I proceed from here?
 A: I think the way you are attempting cannot take care of the consecutive heads.
Since there is an extra constraint of having exactly 8 tails, we need a bivariate generating function, which I think the 
easiest is to obtain the regular expression and convert that to a generating function (analytic combinatorics).
For $h$ heads and $t$ tails, the RE can be written as $$(t+h(t+h(t+h(t+h(t+ht)))))^*(\epsilon+h(\epsilon+h(\epsilon+h(\epsilon+h(\epsilon+h)))))$$
for which the corresponding gf is:
\begin{align*}
  G(h,t) &= \frac{1+h+h^2+h^3+h^4+h^5}{1-t\left(1+h+h^2+h^3+h^4+h^5\right)}
\end{align*}
and the probability is
\begin{align*}
  \frac{1}{\binom{25}{8}}[t^8h^{17}]G(h,t) &= \frac{49741}{120175} \approx 0.413904722280008
\end{align*}
A: You are not counting the integer solutions to $H+T=25$ with $T=8$. Quite obviously, that only has one solution. All that equation says is that the number of heads plus the number of tails is the total number of flips; that equation doesn't know anything about the different ways there are to arrange the flips in sequence without too many consecutive head flips.
Let $h_i$ be the number of heads between the $i$th and $(i+1)$th tail flip, for $i=0,\cdots,8$. (So $h_0$ is the number of heads that appear before the first tail flip, and $h_8$ the number after the last tail flip.) The numbers $(h_0,\cdots,h_8)$ determine the entire sequence of flips.
You're counting the number of $(h_0,\cdots,h_8)$ for which $h_0+\cdots+h_8=17$ and $0\le h_i\le 5$. Can you figure out the correct generating function to use now?
