Analytical result of a combination like generating function

Here is the generating function I'm studying.

$$f=\prod^N_{j=1}\left(1+e^{i\cdot j\varphi}z\right)$$.

$$\varphi$$ is a phase related to a quantum optics problem.

And I want to know the analytical result of:

$$\lim_{z\to 0}\frac{1}{X!}\frac{d^Xf}{dz^X}$$

with $$1\le X\le N$$.

• Maple 2018.2 produces $$-{\frac {-{{\rm e}^{i \left( N+1 \right) \phi}}+{{\rm e}^{i\phi}}}{{ {\rm e}^{i\phi}}-1}}$$ for $X=1$ and $${\frac {2\,{{\rm e}^{i\phi\, \left( N+3 \right) }}- 2\,{{\rm e}^{3\,i\phi}}+2\,{{\rm e}^{i\phi\, \left( N+2 \right) }}-2\, {{\rm e}^{2\,i \left( N+1 \right) \phi}}}{ \left( -{{\rm e}^{2\,i\phi} }+2\,{{\rm e}^{i\phi}}-1 \right) \left( {{\rm e}^{i\phi}}+1 \right) } }$$ for $X=2$. Nothing simple and nice. – user64494 Nov 8 '18 at 9:41
• What is $\varphi$? – Max Alekseyev Nov 8 '18 at 10:13
• @Max Alekseyev: Maple prefers $\phi$ over $\varphi$. – user64494 Nov 8 '18 at 11:17

The limit in question equals the coefficient of $$z^X$$ in $$f(\varphi,z)$$. For $$1\leq X\leq N$$, series multisection allows to express this coefficient in the following closed form: $$\begin{split} & \frac{1}{N}\sum_{k=0}^{N-1} e^{-X\frac{2\pi ik}{N}} f(\varphi,e^{\frac{2\pi ik}{N}})\\ =& \frac{2^N}{N} e^{i\frac{N(N+1)\varphi}4} \sum_{k=0}^{N-1} (-1)^k e^{-X\frac{2\pi ik}{N}} \prod_{j=1}^N \cos\left( \frac{j\varphi}2 + \frac{\pi k}{N}\right). \end{split}$$
I am assuming that $$f(z)$$ is a moment generating function and the OP asks for a compact expression for the moments $$M_X=\lim_{z\to 0}\frac{1}{X!}\frac{d^X}{dz^X}f$$. As indicated in a comment, there is no hope for such a compact expression, however, the cumulants $$K_X=\lim_{z\to 0}\frac{1}{X!}\frac{d^X}{dz^X}\ln f$$ do allow for this:
$$K_X=(-1)^{X+1} \frac{1}{X}\,\sum_{j=1}^N e^{i Xj \phi}=\frac{(-1)^X \left(1-e^{iX N \phi}\right)}{X \left(1-e^{-iX \phi}\right)}.$$