Solving A Linear Recurrence Relation With Complex Roots Question:
For the given linear homogeneous difference equation, find the general solution:
$$y_{n+2} + y_{n+1} + y_n = 0$$ 
With the initial conditions of:
$$y(0)=\sqrt3, y(1) = 0$$ 
Attempted Answer:
I approached the problem normally as one would except by solving the auxiliary equation which yields:
$$m^2 + m + 1 = 0$$
$$\implies m = \frac{-1}{2} \pm \frac{i\sqrt3}{2}$$
Now the general solution is of form:
$$y_n = A \left(\frac{-1}{2} - \frac{i\sqrt3}{2}\right)^n
      + B \left(\frac{-1}{2} + \frac{i\sqrt3}{2}\right)^n $$
Here is the part where I get stuck when I substitute the initial conditions to form a system of equations:
$$A + B = \sqrt{3}$$
$$A \left(\frac{-1}{2} - \frac{i\sqrt3}{2}\right)
      + B \left(\frac{-1}{2} + \frac{i\sqrt3}{2}\right) = 0$$
Now to make my life easier (which it really didn't), I decided to take a 'shortcut' and rewrite the 2nd equation as the sum of an imaginary and real part:
$$\frac{-1}{2}(A + B) + i\frac{\sqrt3}{2}(-A + B) = 0 + 0i$$
Since the real part on the LHS must equal the real part on the RHS, and the same applies for the imaginary part, we obtain:
$$\frac{-1}{2}(A + B) = 0$$
$$\frac{\sqrt3}{2}(-A + B) = 0$$
So the above implies that $A = B = -B$ which can only be true if $A = B = 0$. However if that is the case, then the first equation in the system of equations ($A + B = \sqrt{3}$) implies that 0 = $\sqrt{3}$.
I know that there is a mistake somewhere in the logic of my reasoning (I think perhaps when I equated each real and imaginary part of the LHS to the RHS) but I don't know why and where exactly. Please point out my mistake. 

Use generating functions. Define $A(z) = \sum_{n \ge 0} y_n z^n$, multiṕly your recurrence by $z^n$, sum over $n \ge 0$ and recognize some sums:
$\begin{align}
  \frac{A(z) - y_0 -y_1 z}{z^2}
    + \frac{A(z) - y_0}{z} + A(z)
    &= 0 \\
  \frac{A(z) - \sqrt{3}}{z^2}
    + \frac{A(z) - \sqrt{3}}{z} + A(z)
    &= 0
\end{align}$
Solving for $A(z)$:
$\begin{align}
  A(z)
    &= \frac{(1 + z) \sqrt{3}}{1 + z + z^2} \\
    &= \frac{1 - z^2}{1 - z^3} \sqrt{3}
\end{align}$
We need:
$\begin{align}
  [z^n] A(z)
    &= [z^n] \frac{1 - z^2}{1 - z^3} \sqrt{3} \\
    &= \sqrt{3} [z^n] (1 - z^2) \sum_{k \ge 0} z^{3 k} \\
    &= \sqrt{3} \left(
                  [z^n] \sum_{k \ge 0} z^{3 k}
                     - [z^{n - 2}] \sum_{k \ge 0} z^{3 k}
               \right) \\
   &= \begin{cases}
          \sqrt{3} & \text{if \(n \equiv 0 \pmod{3}\)} \\
        - \sqrt{3} & \text{if \(n \equiv 1 \pmod{3} \wedge n \ge 2\)} \\
          0        & \text{otherwise}
      \end{cases}
\end{align}$
