Solve the reccurence relation $a_n = a_{n-2}, a_0=a_1 = 1$ This is my first time working through this type of problem and I am looking to see if I have worked it out correctly, thanks!

Solve the reccurence relation $$a_n = a_{n-2}, a_0=a_1 = 1$$

First we get the characteristic equation:
$$x^n = x^{n-2}$$
Dividing by the smallest we get,
$$x^2=1$$
$$x = \pm 1$$
Using the auxiliary equation: general solution
$$a_n = A_1x^{n+1} + A_2x^{n+1}$$
Using conditions in the equation and our solution for $x$ gives,
$$a_0 = 1 = A_1(1) + A_2(-1) = A_1 - A_2$$
$$a_1 = 1 = A_1(1)^2 = A_2(-1)^2 = A_1 + A_2$$
Solving for $A_1, A_2$ I got $A_1 = 1, A_2 = 0$
Therefore plugging into the general solution I got,
$$a_n = 1^{n+1}$$
 A: $$a_{2n}=a_{2n-2}=a_0=1$$
$$a_{2n+1}=a_{2n-1}=a_1=1$$
thus
$$\forall n\in \Bbb N \;a_n=1$$
A: Use the method of generating functions (overkill but why not). Set $a_n=0$ for $n<0$ and extend  the recurrence relation to
$$
a_n=a_{n-2}+\delta_{n,1}+\delta_{n,0}\quad (n\geq 0)\tag{1}
$$
so that it is valid for all $n\geq 0$ where $\delta$ is the Kronecker Delta. Let $A(x)=\sum_{n=0}^\infty a_n x^n$ and multiply both sides of (1) by $x^n$ and sum on $n$ to get that
$$
A(x)=x^2A(x)+x+1\iff A(x)(1-x^2)=1+x.
$$
In particular
$$
A(x)=\frac{1+x}{(1-x)(1+x)}=\frac{1}{1-x}=\sum_{n=0}^\infty x^n
$$
whence
$$
a_n=1\quad (n\geq0).
$$
A: We transform $a_{n} = a_{n-2}$ to $a_{n+2} = a_n$ and $a_0=a_1=0$.  
Using generating functions (with $A(x):=\sum_{n \geq 0} a_{n} x^n$) this leads to  
$\begin{eqnarray*}\sum_{n \geq 0} a_{n+2} x^n &=& \sum_{n \geq 0} a_{n} x^n \\
\Leftrightarrow \frac{A(x)}{x^2} - \frac{1}{x^2}-\frac{1}{x} &=& A(x) \\
\Leftrightarrow A(x) = \frac{1}{1-x} &=& \sum_{n \geq 0} x^n
\end{eqnarray*}$  
If we look now at the coefficient of $[x^n]$ with see that it is $1$ and therefore $a_n = 1$.
