# Lacunar series with an interesting (in-formula) symmetry.

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:

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?

• 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. Apr 4, 2010 at 20:52
• 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? Apr 4, 2010 at 21:22
• @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. Apr 4, 2010 at 21:34
• 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. Apr 4, 2010 at 21:46
• 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. Apr 4, 2010 at 23:04