# Sign Enumeration

What is the number of solutions of $(a_i)_{i=1}^n$ such that $$\sum_{i=1}^nia_i\le b,\quad a_i\in\{-1,1\},\quad \sum_{i=1}^n{a_i}=c$$ given $b,c\in\mathbf Z$?

Is there a generating function solution?

The g.f. equals $$\frac1{1-y}\prod_{i=1}^n \left(xy^i + (xy^i)^{-1}\right).$$ That is, the number of solutions is given by the coefficient of $x^cy^b$.
• Call the above generating function $g(x,y)$. The coefficient of $x^cy^b$ is the complex contour integral $\frac{1}{(2\pi i)^2}\oint_{|x|=\delta_1<1}\oint_{|y|=\delta_2<1}\frac{g(x,y)}{x^{c+1}y^{b+1}}dxdy$. But there does not seem to be a simple expression for this integral. Maybe it is useful in obtaining asymptotics for large $n$, $b$ or $c$. I would appreciate it, Max, if you could share your opinion on the benefit/usefulness of generating functions that does not produce simpler expression. – Hans Aug 11 '16 at 21:28
• That was what I thought. I have a dynamic programming or recursive algorithm. Do you know if my contour integral is any good for finding the asymptotics for large $n$, $b$ or $c$? – Hans Aug 12 '16 at 17:48