Find the codimension of $\overline{\operatorname{span}}\{S^n(1,4,-1,0,0,\ldots):n=0,1,2,\ldots\}$ in $\ell_2$. Find the codimension of $A=\overline{\operatorname{span}}\{S^n(1,4,-1,0,0,\ldots):n=0,1,2,\ldots\}$ in $l_2$ where $S$ is the shifting operator to the right: $Se_i=e_{i+1}$.
I don't quote understand how I should do this. It seems that the codim is $1$, for the vectors seem to be independent. The problem is showing it or even showing $e_1$ could be expressed by the subspace. The algorithm is complicated, messy and don't seem to lead to any formula. How does one show it is dense or independent? I assume I can't because it is a question from an exam and it cannot be that direct. 
Attempt: I noticed that if $z=(z_1,z_2,...)$ is orthogonal to the above set, then $z_3=2_1+4z_1,z_4=z_3+4(...4z_1),z_5=z_4+4(...4(..4z_1)$ and so on. Could I assume that $||z||<\infty$ but $||z||\le \sum _{n=1}^{\infty}|4^n z_1|^2$ which converges only for $z_1=0$? Or there is something wrong about it?
 A: Let $x=\left(x_{1},x_{2},\dots\right)$ be in $A^{\perp}$. we get
a sequence of equalities 
\begin{eqnarray*}
x_{3} & = & 4x_{2}+x_{1}\\
x_{4} & = & 4x_{3}+x_{2}\\
 & \vdots\\
x_{n} & = & 4x_{n-1}+x_{n-2}
\end{eqnarray*}
so $x$ follows the recursive rule 
$$
x_{n}=4x_{n-1}+x_{n-2}
$$
Lets look at $\mathbb{R}^{\mathbb{N}}$ a vector spaces that contains
$l^{2}$. We notice that the set of all sequences that follow this
recursive rule is a vector subspace of dimension 2. If we note it by
$B$ then $A^{\perp}=B\cap l^{2}$. One can verify easily that the
sequences 
\begin{eqnarray*}
x_{n}^{1} & = & \left(2+\sqrt{5}\right)^{n}\\
x_{n}^{2} & = & \left(2-\sqrt{5}\right)^{n}
\end{eqnarray*}
 are a base for $B$. We notice as well that $\left|2+\sqrt{5}\right|>1$
and $\left|2-\sqrt{5}\right|<1$. Let $b\in B$ be a general element
of $B$ meaning 
$$
b_{n}=c_{1}x_{n}^{1}+c_{2}x_{n}^{2}
$$
 $c_{1}$and $c_{2}$ are arbitrary constants in $\mathbb{R}$. We
observe that $b\in l^{2}$ iff $c_{1}=0.$ So we get $\dim l^{2}\cap B=1$
