So, I wrote out a table of functions like so:

$\sum_{n=1}^{\infty} (-1)^{n+1}q^{n}=$ $+q^{1}$ $-q^{2}$ $+q^{3}$ $-q^{4}$ $+q^{5}$ + $\ldots$

$\sum_{n=1}^{\infty} (-1)^{n}q^{n^{2}}=$ $-q^{1}$ $+q^{4}$ $-q^{9}$ & $+q^{16}$ $-q^{25}$ $\ldots$

$\sum_{n=1}^{\infty} (-1)^{n+1}q^{n^{3}}=$ $+q^{1}$ $-q^{8}$ $+q^{27}$ $-q^{64}$ $+q^{125}$ $\ldots$

$\sum_{n=1}^{\infty} (-1)^{n}q^{n^{4}}=$ $-q^{1}$ & $+q^{16}$ $-q^{81}$ $+q^{256}$ $-q^{625}$ $\ldots$

$\sum_{n=1}^{\infty} (-1)^{n+1}q^{n^{5}}=$ $+q^{1}$ $-q^{32}$ $+q^{243}$ $-q^{1024}$ $+q^{3125}$ $\ldots$

And noticed that it is possible to rewrite (by transposing the first column so it becomes the first row). The essential (though incomplete) statement of the symmetry here is:

$X(q) = \sum_{m}^{\infty} \sum_{n}^{\infty} (-1)^{m+n} q^{m^{n}} = \sum_{m}^{\infty} \sum_{n}^{\infty} (-1)^{m+n} q^{n^{m}}$

Writing it out appropriately:

$X(q)=\sum_{m=0}^{\infty} (-1)^{m}q^{2^{m}} + \sum_{m=0}^{\infty} (-1)^{m+1}q^{3^{m}} + \sum_{m=0}^{\infty} (-1)^{m}q^{4^{m}} + \sum_{m=0}^{\infty} (-1)^{m+1}q^{5^{m}} + \ldots$

$X(q) = \sum_{n=1}^{\infty} (-1)^{n+1}q^{n} + \sum_{n=1}^{\infty} (-1)^{n}q^{n^{2}} + \sum_{n=1}^{\infty} (-1)^{n+1}q^{n^{3}} + \sum_{n=1}^{\infty} (-1)^{n}q^{n^{4}} + \sum_{n=1}^{\infty} (-1)^{n+1}q^{n^{5}} + \ldots$

Using mpmath I get numerically:

>>> nsum(lambda p: (nsum(lambda n: ((-1)**(n+1))*((1/2.0)**(n**(2.0*p-1))), [1,inf])), [1,inf]) + nsum(lambda p: (nsum(lambda n: ((-1)**(n))*((1/2.0)**(n**(2.0*p))), [1,inf])), [1,inf])
>>> nsum(lambda p: (nsum(lambda n: ((-1)**n)*((1/2.0)**((2.0*p)**n)), [0,inf])), [1,inf]) + nsum(lambda p: (nsum(lambda n: ((-1)**(n+1))*((1/2.0)**((2.0*p+1)**n)), [0,inf])), [1,inf])

And using mpmath's plotting facility, I obtained a picture of $X(q)$:


  1. $\lim_{q\rightarrow 0} X(q) = -1/2$ by numerical evaluation, but just algebraically evaluating the function definition would lead one to believe that X(0)=0. What's going on here?

  2. All theta function identities (including Ramanujan's mock theta functions) that I've seen involve terms with $q^{n^2}$, but nothing higher in the uppermost exponent. Is there any work on series with $q^{n^{3}}$ I've found a paper by A. Sebbar which might be relevant.

  3. Has the function $X(q)$ been studied before? And if so, under what name? Does it have any interesting properties which aren't obvious from its definition. What are the appropriate lower bounds for the most compact representation? (summation) Does this function have any interesting symmetries under the modular group?

  • 4
    $\begingroup$ The sum defining X(q) is not convergent. I see the documentation of nsum mentions that it will happily sum certain divergent series, but if you don't know exactly what it is doing, this means it is silently producing nonsense. $\endgroup$ Apr 4, 2010 at 20:52
  • $\begingroup$ Reid: when you say it is not convergent, are you claiming it fails to converge for each q in the unit disc? or merely that it fails to converge for some q in the (closed) unit disc? $\endgroup$
    – Yemon Choi
    Apr 4, 2010 at 21:22
  • $\begingroup$ @Yemon: It converges only when q=0; consider the terms when m=0. Abel or Cesaro means will converge, and I'm guessing that that is where the 1/2 comes from, but Reid's assessment seems fair. $\endgroup$ Apr 4, 2010 at 21:34
  • 1
    $\begingroup$ Right, it certainly might be the case that you get an interesting function by regularizing the sum $q-q+q-q+\cdots$ appropriately, but without knowing what nsum is doing, question 1 is hard to answer. $\endgroup$ Apr 4, 2010 at 21:46
  • 4
    $\begingroup$ Get rid of the first term of the series, and I think that mess sums absolutely in the interior of the unit disk. :) The limit as $q\rightarrow 0$ is uninterestingly $0$. In fact then the whole story is the alternating sum of $\pm q$. Depending on your method, that could add up to a lot of things. One of my favorite chapters of any book is the first chapter of Hardy's "Divergent Series". At the end of it, you are pretty sure that Hardy had lost his marbles. $\endgroup$ Apr 4, 2010 at 23:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.