TITLE: Interesting summation question: If $a$ and $b$ are the roots of $x^2+x+1$, then what is the below expression equal to?
QUESTION [5 upvotes]: Question: If $a$ and $b$ are the roots of $x^2+x+1$, then what is the below expression equal to?
$$\sum_{n=1}^{1729} \left[(-1)^n\cdot V(n)\right]$$
Where $$V(n)=a^n+b^n$$

My effort:
I think I managed to solve this, but in an inefficient way.
I found $a$ and $b$, calculated $V(1)$,$V(2)$, and so on; after that, I calculated $S_1$,$S_2$ and so on, where $S_n=V(1)+V(2) \cdot\cdot\cdot +V(n)$
I found that
$S_1$,$S_7$,$S_{13}$ $\cdot\cdot\cdot$ resulted in $1$;
$S_2$,$S_8$,$S_{14}$ $\cdot\cdot\cdot$ resulted in $0$;
$S_3$,$S_9$,$S_{15}$ $\cdot\cdot\cdot$ resulted in $-2$;
$S_4$,$S_{10}$,$S_{16}$ $\cdot\cdot\cdot$ resulted in $-3$;
$S_5$,$S_{11}$,$S_{17}$ $\cdot\cdot\cdot$ resulted in $-2$;
$S_6$,$S_{12}$,$S_{18}$ $\cdot\cdot\cdot$ resulted in $0$;
Since $S_{1729}$ would come under the first sequence, I think the answer to the question is $1$.

My request: Could someone please suggest a more efficient method to tackle/solve this problem?
Thank you in advance.

REPLY [3 votes]: Another way to look at the problem could be the following.
The roots of $x^2+x+1=0$ are given by $$a=-\frac{1}{2}-\frac{i \sqrt{3}}{2}=e^{-\frac{2 i \pi }{3}}$$  $$b=-\frac{1}{2}+\frac{i \sqrt{3}}{2}=e^{+\frac{2 i \pi }{3}}$$ So $$a^n=e^{-\frac{2 n i \pi }{3}}$$ $$b^n=e^{+\frac{2 n i \pi }{3}}$$ $$a^n+b^n=2 \cos \left(\frac{2 \pi  n}{3}\right)$$ $$S_p=\sum_{n=1}^p (-1)^n (a^n+b^n)=2 \cos \left(\frac{(5 p+1)\pi}{3}   \right)-1$$