Im confused as to what the question is asking and how to solve this?
Consider the following recurrence:
$a_n = a_{n-1} - a_{n-2}$
where $a_0 = 0 $ and $a_1 = 1$
(a) Using the recurrence and the the initial conditions, generate the first 18 numbers of the sequence {${a_n}$}. Try to guess a way to compute $a_n$ immediately by simply knowing n.
(b) Solve for $a_n$. Hint: observe that $a_n$ has the form $a_n = Aa_{n-1} + Ba_{n-2},$ but you are going to encounter a little surprise!
(c) Your expression for ${a_n}$ in part (b) most likely contains the imaginary number i. Use the binomial theorem to obtained a nicer expression for $a_n$:
$$a_n = \frac{1}{2^{n-1}} [\binom n1 3^0 - \binom n3 3^1 + \binom n5 3^2-...]$$