Consider: $$(1+x)^n= p_0 + p_1 x + p_2 x^2+\cdots$$ From where $$p_0=1,\quad p_1=\dfrac{n}{1},\quad p_2=\dfrac{n(n-1)}{2!},\ldots$$ Are the coefficients of the Newton´s Binomial expansion, using $x=i$ show that:
$$p_{0}-p_{2}+p_{4}-\dots=2^{n/2}\cos{\dfrac{n\pi}{4}}$$
$$p_{1}-p_{3}+p_{5}-\dots=2^{n/2}\sin{\dfrac{n\pi}{4}}$$
Adding to Kuai's answer, Use De Moivre's theorem to expand on $(1+i)^n$
$$2^{n/2}*cos(\frac{n\pi}{4})$$ as the real part and
$$2^{n/2}*sin(\frac{n\pi}{4})$$ as the imaginary part