In the book Galois Theory of Ian Stewart, problem 1.11 states: "Let $P(n)$ be the number of ways to arrange $n$ zeroes and ones in a row, given that ones occur in groups of three or more. Show that $P(n)=2P(n-1)-P(n-2)+P(n-4)$".
From the recurrence relation, I guess we have to divide the problem. Here's what I did
- If the first position is $0$, we have $P(n-1)$ ways.
- If the first position is $1$, we have $P(n-1)$ ways subtracting some situations
And this is where I'm stuck. Any help would be appreciated. Thank you