TITLE: Is there a formula for $(1+i)^n+(1-i)^n$?
QUESTION [15 upvotes]: I'm wondering if there is a formula for the value of $(1+i)^n+(1-i)^n$?
I calculated the first terms starting with $n=1$ to be, in order, $2$, $0$, $-4$, $-8$, $-8$, $0$, $16$, $\dots$
So it seems to be some sequence of positive and negative powers of $2$ with $0$s thrown in. Is there a more explicit formulation of what $(1+i)^n+(1-i)^n$ is, based on $n$? 
With the binomial theorem, I get it equal to
$$
\sum_{k=0}^n\binom{n}{k}i^{n-k}(1+(-1)^{n-k}).
$$
Can this be made nicer?
Thanks.

REPLY [2 votes]: For variety, here's a sketch of another approach. Let $x_n = (1+i)^n + (1-i)^n$. Then,
$$\begin{align}x_n^2 &= \left( (1+i)^2 \right)^n + \left( (1-i)^2 \right)^n + 2 \left( (1+i)(1-i) \right)^n
\\ &= (2i)^n + (-2i)^n + 2 \cdot 2^n
\\ &= 2^n (2 + i^n + (-i)^n)
\end{align} $$
at which point it's pretty easy to work out the pattern; the only thing left is to work out the sign on the non-zero terms: i.e. when is the real part of $(1+i)^n$ positive?