1

Let $n\in N^{+}$,and the sequence $x_{n}$ number of elements $$\{(a_{1},a_{2},\cdots,a_{n})|a_{i}a_{i+1}=0,\rm{and}~ a_{i}\in\{0,1\},\forall i=1,2,\cdots,n\}$$

Question: Find the colsed form $x_{n}(n\ge 2)$

for $n=2$, such $(a_{1},a_{2})=(0,1),(0,0),(1,0)$,so we have $x_{2}=3$

for $n=3$

$$(a_{1},a_{2},a_{3})=(0,1,0),(0,0,1),(0,0,0),(1,0,1),(1,0,0)$$ so $x_{3}=5$

but $x_{n}=?$

Thanks

partofsha
  • 294

1 Answers1

1

A binary sequence without a repeated '$1$' can end in either a '$0$' or '$01$'. Any binary sequence without a repeated '$1$' can be gotten by appending either a '$0$' or a '$01$' to an existing sequence. Thus,

The number of sequences of size $n$ that end in '$0$' is $x_{n-1}$.
The number of sequences of size $n$ that end in '$01$' is $x_{n-2}$.

Therefore, $x_1=2$, and $x_2=3$ and $$ x_n=x_{n-1}+x_{n-2}\tag{1} $$ Recurrence $(1)$ the recurrence for the Fibonacci Numbers. In fact, using the initial values, we get $$ x_n=F_{n+2}\tag{2} $$

robjohn
  • 345,667