Let $A_n$ denote the set of strings of elements of the set {0, 1} of length $n$. Let $B_n$ be those strings in $A_n$ which do not contain $0,1,1$ as a sub-string (in consecutive positions). Let $b_n = |B_n|$.
Prove that for $n\geq4$ we have $b_n =b_{n−1}+b_{n−2}+1$. Furthermore, determine the generating function for this sequence.
I tried to prove the recurrence relation in the first part via induction, but ran into a tricky situation where I had to consider the number of substrings that started with $1,1$ and that got me nowhere. I tried to skip over that and determine the generating function by assuming that the recurrence relation was true and got $f(x)=\sum\limits_{n=0}^{\infty}b_nx^n=-\frac{1}{1-x}*\frac{1}{x^2+x-1}$ by considering $f(x)+xf(x)+\frac{1}{1-x}$ but I'm also unsure of what to do with my result.
I feel that I'm missing some key insight (or maybe just making a silly algebra error) in my work, and was wondering how others might go about this problem.
As lulu points out in a comment: First note that if the binary string ends with $11$ then it must consist entirely of $1$'s.
Let $x_n$ denote the number of binary strings that end with $0$ (that avoid $011$).
Let $y_n$ denote the number of binary strings that end with $01$ (that avoid $011$).
It is then easy to set up the following recurrence relations \begin{eqnarray*} b_n&=&x_n+y_n+1 \\ x_{n+1}&=&x_n+y_n+1 \\ y_{n+1}&=&x_n. \end{eqnarray*} Grind through the algebra and we have $b_{n}=b_{n-1}+b_{n-2}+1$.
Now multiply this equation by $x^n$ and sum from $n=2$ up to $ \infty$ and we have \begin{eqnarray*} \sum_{n=2}^{\infty} b_{n} x^n= \sum_{n=2}^{\infty} b_{n-1} x^n+ \sum_{n=2}^{\infty} b_{n-2} x^n+ \sum_{n=2}^{\infty}x^n \\ f(x)-1-2x =x(f(x)-1) +x^2f(x)+\frac{x^2}{1-x}. \end{eqnarray*} It is now a hop & skip derive a formula for $f(x)$.