# What's the coefficient of $z^m$ in $\Pi_{k=1}^{n}(z-e^{ik\pi})$?

Consider the following question:

What's the coefficient of $z^4$ where

$$\Pi_{k=1}^{7}(z-e^{ik\pi}), \quad z\in{\bf C}$$

I am wondering whether there is some "trick" for solving the problem above quickly, instead of simply expanding the product or using the Taylor expansion. More generally,

What's the coefficient of $z^m$ where

$$\Pi_{k=1}^{n}(z-e^{ik\pi}), \quad z\in{\bf C}$$

What's the topic to which the above question is related in complex analysis and where such formula might appear?

-
This isn't a problem in complex analysis. Do you know what $e^{i \pi}$ is? – Qiaochu Yuan May 25 '11 at 22:11
@Qiaochu: Oops, I found I raised a stupid question here. I think your nice comment is enough to be the answer. If one replace $e^{ik\pi}$ to be $z_k$, which was at first in my mind, things might be not that obvious. – Jack May 25 '11 at 22:17
@Jack: then no. The coefficient of $z^4$ is nothing more and nothing less than a certain polynomial in the $z_k$. When $z_k$ takes a special form there are various options depending on the special form. – Qiaochu Yuan May 25 '11 at 22:21
@Qiaochu: I'm curious about your edited comment---why this is not a problem in complex analysis? And this has confused me a long time. In the undergraduate courses in some countries, complex analysis is sometimes called "Theory of complex variable functions". Some students might relate the topic about complex numbers to complex analysis. – Jack May 25 '11 at 22:26
@Jack: beyond knowing what $e^{i \pi}$ is, this is a completely elementary problem, and the intent of the problem is not (I assume) to test your knowledge of the value of $e^{i \pi}$. The fact that $z$ is stipulated to lie in $\mathbb{C}$ is irrelevant. – Qiaochu Yuan May 25 '11 at 22:29

As mentioned above, $e^{ik} \in \{-1,1\}$. Therefore, your product is $(z^2-1)^{n/2}$ when $n$ is even and $(z^2-1)^{(n-1)/2}(z-1)$ if $n$ is odd. Expanding and using binomial coefficients you can get a closed form for the result.
If we integrate around a contour, we pick up information about the residues of our function. Therefore, if we want to convert information about $z^4$ into information contained in residues, we divide by $z^5$. Then, by integrating over over any circle containing $0$, we obtain the desired result.