Expanding product of binomials $(z^k + z^{-k})$ Suppose $z$ is a complex number, and consider the product
$$f_m(z)=\prod_{k=1}^m \left(z^k + \frac 1 {z^k} \right),$$
for $m = 1,2,\dots$ . Of course, one should be able to expand this into a sum of terms that are either powers of $z$ or of $1/z$. It is easy to see that the highest and lowest order terms will be $z^{1 + 2 + \cdots + m} = z^{\frac 1 2m(m+1)}$ and its reciprocal, respectively.
Here's the situation for low values of $m$:
$$\begin{split}
f_1(z) = z &+ \frac 1 z \\
f_2(z) = z^3 + z &+ \frac 1 z + \frac 1 {z^3} \\
f_3(z) = z^6+z^4+z^2+\ &\color{red}2 + \frac 1 {z^2}+ \frac 1 {z^4} + \frac 1 {z^6} \\
f_4(z) = z^{10} + z^8 + z^6 + \color{red}2z^4 + \color{red}2z^2 +\  &\color{red}2 + \frac {\color{red}{2}} {z^2} + \frac {\color{red}2} {z^4} + \frac 1 {z^6} + \frac 1 {z^8} + \frac{1}{z^{10}} \\
f_5(z)=z^{15} + z^{13}+ z^{11} + \color{red}2z^{9} + \color{red}2z^7 + \color{orange}3z^5 + \color{orange}3z^3 + \color{orange}3z &+ \frac{\color{orange}3} z + \frac {\color{orange}3}{z^3} + \frac {\color{orange}3} {z^5} + \frac {\color{red}2} {z^7} + \frac {\color{red}2} {z^9} + \frac 1 {z^{11}} + \frac 1 {z^{13}} + \frac 1 {z^{15}}
\end{split}$$
It seems that


*

*In each $f_m$ the exponent of $z$ falls from $\tau_m = \frac 1 2 m(m+1)$ down to $-\tau_m$, skipping every other value;

*For all $m$ the coefficient $a_{m,n}$ of the $n$-th term in the analytic part is equal to the coefficient $a_{m,-n}$ of the $n$-th term in the singular part (which makes sense intuitively).



So:
  
  
*
  
*Is there a closed-form expression for $a_{m,n}$?
  
*How can I prove fact 1. above?
  

 A: This is just a start, not a solution, but I can't fit it in a comment.  Maybe it's enough for you to answer the question yourself.  We can think of the problem this way.  Partition $[m] = \{1,2,\dots\}$ into two sets $A$ and $B$ and let $\sum A$ and $\sum B$ be the sum of the elements of $A$ and $B$ respectively.  Then $a_m,k= [z^k]f_m(z)$ is the number of such partitions with $\sum A-\sum B = k$.  We have $$
a_{m,k}=\cases{
1,& $m=1,\ |k|=1$\\
0,& $m=1,\  |k|\neq 1$\\
a_{m-1,k-m}+a_{m-1,k+m},&otherwise
}
$$   
This is because the partitions of $[m]$ arise from adding the element $m$ to one of the sets in a partition of $[m-1].$  Notice that I am assuming that $a_{m,k}$ is defined for all positive integers $m$ and all integers $k.$  Just make $a_{m,k}=0$ when $z^k$ does not appear in $f_m.$ 
I have no idea whether this can be solved for $a_{m,k}$ in closed form, but at least it makes it easy to calculate.  
A: Here is a proof for $1$. Suppose the monomial $z^n$ appears in the expanded expression. Then we may write 
$$
n=\sum_{k=1}^m(-1)^{e_k} k
$$
where each $e_k$ is either $0$ or $1$. Let $P$ denote the indices for which $e_k=0$, i.e. the positive terms, and $N$ the indices for which $e_k=1$, i.e. the negative terms. Then 
$$
n=\sum_{k\in P}k-\sum_{j\in N}j.
$$
We can add $0$ as such:
$$
n=\sum_{k\in P}k+\sum_{j\in N}j-\sum_{j\in N}j-\sum_{j\in N}j,
$$
and now rearrange to get 
$$
n=\sum_{k\in P\text{ or }N}k-2\sum_{j\in N}j
$$
which gives 
$$
n=\tau_m-2\sum_{j\in N}j.
$$
Thus we know that the exponent $n$ must be $\tau_m$ minus an even number, which restricts the possibilities to what you conjectured. To see that all of these are actually possible, consider what happens when $N=\{1\},\{2\},\dots,\{m\},\{1,m\},\{2,m\},\dots,\{m-1,m\}$, etc.
A closed form for $a_{m,n}$ is probably difficult. Here is an idea. If we multiply the entire product by $(z^m)^m$, we obtain 
$$
f_m(z)=\frac{1}{(z^{m})^m}\prod_{k=1}^m(z^{m+k}+z^{m-k}),
$$
and now you are looking almost at partitions of $n$ into distinct parts, althought you add the additional restriction that precisely one of $m+k$ or $m-k$ is used. 
Hope this helps.
A: This is not an answer, but maybe help you to find an answer. 
Since the function is same as
$$
f_{m}(z) = \frac{1}{z^{m(m+1)/2}}\prod_{k=1}^{m}(1+z^{2k}),
$$
it is enough to find an explicit formula for the coefficients of the polynomial
$$
g_{m}(z) = \prod_{k=1}^{m}(1+z^{k}).
$$
Note that $f_{m}(z) = g_{m}(z^{2})/z^{m(m+1)/2}$. One can observe that the $n$-th coefficient of $g_{m}(z)$ is same as the number of ways to express $n$ as a sum of distinct numbers that are less or equal to $m$. 
It seems that it is really hard to find the explicit formula for such coefficients, since the explicit formula for $q(n) = \lim_{m\to \infty}[z^{n}]g_{m}(z)$ ($n$-th coefficient of $\prod_{k=1}^{\infty} (1+z^{k})$, which is a number of ways to express $r$ as a sum of distinct numbers, without any condition on the bound of such numbers), closely related to the ordinary partition number $p(n)$: 
$$
p(n) =\sum_{k=0}^{\lfloor n/2\rfloor} q(n-2k)p(k).
$$
Also, it is known that $q(n)$ has a following explicit formula
$$
q(n) = \frac{1}{\sqrt{2}}\sum_{k=1}^{n}A(2k-1, n)\frac{\partial J_{0}\left(\frac{\pi i}{2k-1}\sqrt{\frac{1}{3}\left(n+\frac{1}{24}\right)}\right)}{\partial n}
$$
where $A(k, n)$ is a generalized Kloosterman sum 
$$
A(k, n) = \sum_{\substack{1\leq h\leq k \\ \gcd(h, k) = 1}}\exp\left(\pi i \sum_{j=1}^{k=1}\frac{j}{k}\left(\frac{hj}{k} - \lfloor \frac{hj}{k}\rfloor - \frac{1}{2}\right)- \frac{2\pi i n h}{k}\right)
$$
and $J_{0}$ is a first kind of Bessel function. This formula seems not to be that helpful, and at least we have a asymptotic formula 
$$
q(n) \sim \frac{1}{4\sqrt[3]{3}n^{3/4}}\exp\left(\pi\sqrt{\frac{n}{3}}\right).
$$
All of these formulas are from here, and sadly I don't know proof of any of these. (Maybe the last one comes from a Hardy-Littlewood's circle method, since similar asymptotic formula for $p(n)$ is proved by such method.)
A: A proof of 1. could go as follows.

We obtain for  integral $m\geq 1$
  \begin{align*}
\color{blue}{f_m(z)}&=\prod_{k=1}^m\left(z^k+\frac{1}{z^k}\right)\\
&=\prod_{k=1}^m\left(z^{-k}\left(1+z^{2k}\right)\right)\\
&=z^{-\sum_{k=1}^mz^k}\prod_{k=1}^m\left(1+z^{2k}\right)\tag{1}\\
&=z^{-\frac{1}{2}m(m+1)}\sum_{j=0}^{\sum_{k=1}^m k}a_jz^{2j}\tag{2}\\
&\,\,\color{blue}{=z^{-\frac{1}{2}m(m+1)}\sum_{j=0}^{\frac{1}{2}m(m+1)}a_jz^{2j}}\\
\end{align*}
  In the last line we observe the smallest power of the expression is $-\frac{1}{2}m(m+1)$ while the greatest power is
   $-\frac{1}{2}m(m+1)+m(m+1)=\frac{1}{2}m(m+1)$.

Comment:


*

*In (1) we have a finite product where each term is either $1$ or $z^{2k}$. We so obtain a polynomial with smallest power $0$ and greatest power of $z^2$ equal to $\sum_{k=1}^m k$. This polynomial is written more conveniently in (2).

