I'm a bit stuck with this problem and I'm sorry if this sounds newbie, I havent had much practice with recurrence relations. My approach was to split the problem into two cases, we let $a_n$ denote all legal binary strings of length $n$
- Appending $1$ to the front of a string, this case is simple because no illegal strings can be made by appending $1$ in front of a legal string, so by appending $1$ to all legal strings of length $n-1$ we get $a_{n-1}$ legal strings.
- Appending $0$ to the front of a string, this is where I get stuck.
My idea was to split the second case into even further cases so that each case would deal with the following prefixes: $00$, $01$, $10$ and $11$
The problem is that I can not find any good way to determine how many of each prefix occurs in the set of legal strings of length $n-1$. Any advice on this problem (or this subject in general) would be greatly appreciated since there is clearly something that I'm misunderstanding.