Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find a closed form of the generating function

$$ G(x) = \sum_{n \ge 0} r^\binom{n}{2} x^n $$

for a real number $0 < r < 1$. I found that $G(x) = 1 + xG(rx)$. Any hints where to go next?

Taking into account the answer by @zyx below, let

$$ H(x) = \sum_{n\in\mathbb{Z}} r^\binom{n}{2} x = \prod_{m\ge1} (1-r^m)(1+r^{m-1} x)(1+r^m x^{-1}), $$

where the equality of the sum and product comes from the Jacobi triple product. Note that $H(rx) = xH(x^{-1})$.

Also, using $\binom{-n}{2} = \binom{n+1}{2}$, we can obtain $\sum_{n<0} r^\binom{n}{2} x^n = xG(x^{-1})-x-1$.

Now what?

share|cite|improve this question
I added some tags that go with the Jacobi triple product. – zyx Mar 17 '13 at 4:14
The last is wrong, $\binom{-n}{2} = (-1)^n \binom{n + 1}{1} = (-1)^n (n + 1)$ – vonbrand Mar 17 '13 at 12:28
@vonbrand: I don't follow. $\binom{-n}{2} = \frac{-n(-n-1)}{2} = \frac{n(n+1)}{2} = \binom{n+1}{2}$ – Snowball Mar 17 '13 at 12:48
When a theta function is $\sum_{-\infty}^\infty$, one sometimes sees the term "partial theta function" for the half-version $\sum_0^\infty$. – GEdgar Mar 17 '13 at 12:54
By the way, for $r=2$, $G(x)$ counts the number of graphs on $n$ labelled vertices. I guess for general $r$, $G(x)$ counts the number of ways of colouring the edges of a graph on $n$ labelled vertices, with $r$ colours. Closed forms are overrated; usually it is possible to work with generating functions without them. By the way, note that this GF diverges everywhere (has radius of convergence $0$), so it is hard to apply analytic methods on it. – ShreevatsaR Jan 9 '14 at 9:40

This is essentially the problem solved by Jacobi's triple product formula/identity.

share|cite|improve this answer
That Wikipedia page looks... frightening. Can you recommend any textbooks discussing this and its context? – Snowball Mar 17 '13 at 7:06
I think there is a short (one page or less) proof by George Andrews but not sure where it appears. – zyx Mar 17 '13 at 7:13
The formula gives $\sum_{n=-\infty}^\infty r^\binom{n}{2} x^n = \prod_{m=1}^\infty (1 - r^m)(1 + r^{m-1} x)(1 + r^m x^{-1})$. Any suggestions on what to do about the part of the summation where $n<0$? (The g.f. I'm looking for sums over $n \ge 0$.) – Snowball Mar 17 '13 at 8:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.