Explicit formulas for $\operatorname{Re}(z^n)$ and $\operatorname{Im}(z^n)$ I'm looking for a closed formula for the real and imaginary part of $z^n = (u + iv)^n$.
We have 
$$\operatorname{Re}(z^{n+1}) = u\operatorname{Re}(z^{n}) - v\operatorname{Im}(z^{n})$$
$$\operatorname{Im}(z^{n+1}) = v\operatorname{Re}(z^{n}) + u\operatorname{Im}(z^{n})$$
For $n = 1,2,3,4,5$ we have
\begin{array}{|c|l|l|}
\hline
z^n & \operatorname{Re}(z^n) & \operatorname{Im}(z^n)  \\ \hline
z^1 & u & v\\ \hline
z^2 & u^2 - v^2 & 2vu \\ \hline
z^3 & u^3 - 3uv^2 & -v^3 + 3vu^2 \\ \hline
z^4 & u^4 - 6u^2v^2 + v^4 &  4vu(u^2 - v^2) \\ \hline
z^5 & u^5 - 10u^3v^2 + 5uv^4 & v^5 -10v^3u^2 + 5vu^4\\ \hline
\end{array}
I'm having a hard time to figure out what the explicit formulas for $\operatorname{Re}(z^n)$ and $\operatorname{Im}(z^n)$ do look like.
 A: Using the binomial formula $$\boxed{(x+y)^n = \sum_{k=0}^n \binom{n}{k}x^{n-k}{y^k} = \sum_{k=0}^n \binom{n}{k}y^{n-k}x^k}$$ 
one can yield an analytic expression for $z^n = (u+iv)^n$, letting $x=u$ and $y=iv$. Then, we yield :
$$(u+iv)^n = \sum_{k=0}^n \binom{n}{k}u^{n-k}(iv)^k = \sum_{k=0}^n \binom{n}{k}u^{n-k}i^kv^k$$
Now, depending on whether $k$ is odd or even, can you make a conclusion and derive an explicit formula for $\Re\{z^n\}$ and $\Im\{z^n\}$ ?
Note : Don't care about the binomial coefficient, it's just a constant.
A: Use the binomial formula to expand $\left(u+iv\right)^n$. Now, the real terms are precisely the ones where the power of $iv$ is even, and the imaginary terms are precisely the ones where the power of $iv$ is odd. Explicitly, $$\left(u+iv\right)^n = \sum_{r=0}^n {n\choose r}\left(iv\right)^n u^{n-r},$$ so $$\textrm{Re}\left(z^n\right) = \sum_{r=0}^{\lfloor\frac{n}{2}\rfloor}{n \choose 2r}\left(-1\right)^r v^{2r} u^{n-2r}$$ and $$\textrm{Im}\left(z^n\right) = \sum_{r=1}^{\lfloor\frac{n+1}{2}\rfloor}{n \choose 2r-1}\left(-1\right)^{r-1} v^{2r-1} u^{n-2r+1}.$$
