Find a recurrence relation for the number of bit strings of length $n$ by Goulden-Jackson I am working over Goulden -Jackson Method, I tried to undergo every possible question type.
I obtained the following questions from Rosen's Discrete Mathematics and Its Applications. I solved them by classical way, but when I tried to solve them via Goulden - Jackson, I got stuck.

a-) Find a recurrence relation for the number of bit strings of length $n$ which do not contain three consecutive zeros

My work = The bad word is $000$ , but it has two overlapping such that $0,00$ . Unfortunately, I do not know how to approach when there are two different overlapping words. I got stuck there.

b-) How many bit strings of length $n$ contain either five consecutive zeros or five consecutive ones.

My work = I thought that I can reach the solution by all cases - $(00000,11111)$ are bad words. In this situation, I reached $\frac{1}{1-2x} - \frac{1}{1-2x+2x^5}$ , but when I convert it into recurrence form, it does not satisfy the desired result.

c-) How many bit strings of length $n$ contain either three consecutive zeros or four consecutive ones.

My Work = It has the same logic as part $b$
I hope to find answers for my questions. Thanks for your works.
 A: I will answer part (a). Parts (b) and (c) should be done similarly.
Using the Goulden Jackson method you mention, the generating function is
$$f(s) = \frac{1}{1-2s-w},$$
where $w$ is the weight of the cluster of bad words. The bad word in our case is just $\{000\}$. We have that $w$ satisfies
$$w = -s^3 - (s^2+s)w$$
since there are two overlaps of $000$ with $000$, one of length one and one of length two.
Solving for $w$ gives $w = \frac{-s^3}{1+s+s^2}$. Plugging this in gives the generating function
$$\frac{1}{1-2s+\frac{s^3}{1+s+s^2}} = \frac{1+s+s^2}{1-s-s^2-s^3}$$
You can verify that the first few terms of the above are
$$1+2s+4s^2+7s^3+13s^4+24s^5+O(s^6)$$
and the first few terms can be verified.
A: Not using the Goulden Jackson Method:
For part (a), let $a_n$ be the number of bit strings of length $n$ with no three consecutive $0$s. Assume $n\geq 4$ (for $n=1,2,3$, we'll need to calculate manually to find the initial conditions). By the sum rule, we split the cases into three possibilities for the starting bit(s).
$$a)\ 1..$$
$$b)\ 01..$$
$$c)\ 00..$$
$$$$
In the first case, there are $a_{n-1}$ bit strings of length $n$ without $000$ that start with a $1$ (just append it to the $1$). For the second case, $a_{n-2}$.For the third case, the next bit must be a $1$, so there are $a_{n-3}$ ways there. The answer is thus
$$a_n = a_{n-1}+a_{n-2}+a_{n-3},$$
with initial conditions $a_1 = 2,a_2 = 4,a_3 = 7$.
