# Find all sequences that satisfy the recurrence relation

Find all sequences that satisfy the recurrence relation

$$u_n\cdot (u_{n+1})^2-u_{n+1}-u_n+1=0, \text{with }u_0=1$$

My try

First, we find $u_1$, which follows $u_0=1$.

$u_0\cdot (u_{1})^2-u_{1}-u_0+1=0$

$(u_1)^2-u_1-1+1=0$

$(u_1)^2-u_1=0$

$u_1=0 \vee u_1=1$

Clearly, there are two possible sequences $a$ and $b$, which respectively begin with $1,0\ldots$ and $1,1,\ldots$.

Then, we find the $u_2$ for sequence $a$:

$u_1\cdot (u_{2})^2-u_{2}-u_1+1=0$

$-u_2-0+1=0$

$u_2=1$

$1,0,1,0,1,\ldots$ and $1,1,1,1,1,\ldots$

Question

Am I right?

• You may think of $1,0,1,0,1,1,1,0,1,1,...$ or $1,0,1,1,1,0,1,0,1,1,...$ ;) – Leaning Sep 28 '14 at 12:49
• Oh, shit, forgotten. Thanks! How should I write this down formally? – rae306 Sep 28 '14 at 12:57
• As suggested by Dom, I think we may write the set of all sequences as $\{\{u_n\}|\forall n: u_n\in\{0;1\},u_n+u_{n+1}\ne 0\}$ – Leaning Sep 28 '14 at 13:01