We have alphabet consisting of two chars $\{ 0, 1 \}$ and over this alphabet we have language defined by following rules:
- There are no words of length $1$
- Words of length $2$ are only "$10$" and "$00$"
- Every other combination of chars of length $n$ where $n > 2$ is considered a word when "$1$" are left where they're supposed to be and "$0$" are replaced with another arbitrary word of length smaller than $n$
How do I show that for every positive $n$ is the number of words of length $n$ equal to: $$\frac{2^n+2*(-1)^n}{3}$$
Example
n = 1 -> { }
n = 2 -> { 10, 00 }
n = 3 -> { 110, 100 }
n = 4 -> { 1010, 1000, 0010, 0000, 1110, 1100 }
...