<s>[INST] Complex numbers: proof of equality Can anyone help me prove following equality?
$$\left(\frac{-1+i\sqrt{3}}{2}\right)^n + \left(\frac{-1-i\sqrt{3}}{2}\right)^n$$ $$=2 \iff \frac{n}3\in \mathbb{N}$$
$$=-1 \iff \frac{n}3\not\in \mathbb{N}$$
This is what I've got:
$$\left(\frac{-1+i\sqrt{3}}{2}\right)^n + \left(\frac{-1-i\sqrt{3}}{2}\right)^n$$
$$= \left(\frac{2(cos(-\pi/3)+i sin(-\pi/3))}2\right)^n + \left(\frac{2(cos(\pi/3)+i sin(\pi/3))}2\right)^n$$
$$=[cos(-\pi/3)+isin(-\pi/3)]^n-[cos(\pi/3)+isin(\pi/3)]^n$$
$$=cos(n\pi/3)-isin(n\pi/3)-cos(n\pi/3)-isin(n\pi/3)$$
$$=-2isin(n\pi/3)$$
and if $n/3 \in \mathbb{N}$, I get $n'\pi$ and $sin(n'\pi)=0$ which isn't the result I needed...
 [/INST] Theres no point in converting to trig unless you are familiar and comfortable with polar coordinates.  If so:
$(\frac {-1 + i\sqrt{3}}2)^n+(\frac {-1 - i\sqrt{3}}2)^n=$
$(\cos \frac {2\pi}{3} + i \sin \frac {2\pi}{3})^n + (\cos \frac {4\pi}{3} + i \sin \frac {4\pi}{3})^n=$
$(e^{i\frac{2\pi}{3}})^n + (e^{i\frac{4\pi}{3}})^n=e^{i\frac{2n\pi}{3}} + e^{i\frac{4n\pi}{3}}=$
$(\cos \frac {2n\pi}{3} + i \sin \frac {2n\pi}{3}) + (\cos \frac {4n\pi}{3} + i \sin \frac {4n\pi}{3})=$
$3|n$ i.e. if $n = 3k$
$= \cos 2k\pi + i \sin 2k \pi + \cos 4k\pi + i\sin 4k\pi = 1 + 0i + 1 + 0i = 2$
if $3\not \mid n$ ie. if $n = 3k \pm 1$
$ = \cos (\pm \frac{2\pi}3) + i \sin (\pm \frac{2\pi}3) + \cos (\pm \frac{4\pi}3) + i \sin (\pm \frac{4\pi}3)$
$= -\frac 12 \pm i\frac{\sqrt{3}}{2} -\frac 12 \mp i \frac{\sqrt{3}}{2}= -1$
But really itd be easier to realize: $(\frac {-1 \pm i\sqrt{3}}2)^3 = 1$ and $(\frac {-1 \pm i\sqrt{3}}2)^2 = \frac {-1 \mp i\sqrt{3}}2$ [just multiply them out]so
$(\frac {-1 + i\sqrt{3}}2)^{3k + i} + (\frac {-1 - i\sqrt{3}}2)^{3k + i} = $
$(\frac {-1 + i\sqrt{3}}2)^i + (\frac {-1 - i\sqrt{3}}2)^i = 1 + 1 = 2$ if $i = 0$
$=(\frac {-1 \pm i\sqrt{3}}2) + (\frac {-1 \mp i\sqrt{3}}2)$
$= -\frac 12 - \frac 12 =-1$ if $i = 1$ or $i = 2$.
</s>