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]) mpf('-0.10999554665856692') >>> 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]) mpf('-0.10999554665855271')

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

Questions:

$\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?

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.

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?

`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$ – Reid Barton Apr 4 '10 at 20:52`nsum`

is doing, question 1 is hard to answer. $\endgroup$ – Reid Barton Apr 4 '10 at 21:46