Summation of an infinite q-series When calculating a Partition function, I encounter the following summation
$$\sum_{n=0}^{\infty} x^n q^{n^2}.$$
I know that the sum $\sum_{n=-\infty}^{\infty} x^n q^{n^2}$ is a Theta function, but I do not know how to perform the sum from 0.
Can anyone help?
By the way I would like to have the result in an infinite product form, which I can easily do in the Theta case using Jacobi's triple product identity.
I want to make a small addition to this question which might or not be related but is also relevant for the physical problem  I want to solve. The usual formulas for the infinite product generating functions involve products over 1 integer. To be more concrete one has for example
$$\sum_{n=0}^{\infty} \frac{x^n q^{n(n-1)/2}}{(1-q) ... (1-q^n)} = \prod_{m=0}^{\infty} (1+ x q^m).$$
which is the Partition for fermions.
Do you know any reference where people study double products like
$$\prod_{m,n=0}^{\infty} (1+ x q^{(n \pm m)}).$$
or maybe
$$\prod_{m,n=0}^{\infty} (1+ x q^{(n m)}).$$
Can then one write them as infinite sums with one label as
$$\sum_{n=0}^{\infty} x^n A^{n}?$$
 A: Those are usually called partial theta functions. They were probably first studied in some depth by Ramanujan, and seem to be closely related to general q-series, mock modular forms. They also show up in combinatorics and statistical physics.
They are not necessarily as well behaved as the complete ones, and usually not modular, but some basic properties such as convergence for $|q|<1$ still holds.
In particular, you still have an infinite product. Using q-Pochhammer notation, I think you can recover what you are looking for from the following Jacobi-type identity:
$$1+\sum_{n=1}^\infty (-1)^nq^{n(n-1)/2}(a^n+b^n)=(q)_\infty(a)_\infty(b)_\infty \sum_{n=1}^\infty \frac{(ab/q)_{2n}q^n}{(q)_n(a)_n(b)_n(ab)_n}$$
This is proved in section 2 of the paper:


*

*S. Ole Warnaar, Partial Theta Function I. Beyond the Lost Notebook (2003)


See that you can get Jacobi's triple product identity by taking $b=q/a$.
For more general information about partial thetas here are some references:


*

*Vladimir Petrov Kostov, A property of a partial theta function (2015)

*Krishnaswami Alladi, A partial theta identity of Ramanujan and its number-theoretic interpretation (2009)

*Jeremy Lovejoy, Ramanujan-type partial theta identities and conjugate Bailey pairs (2012)

*Kathrin Bringmann, Amanda Folsom, Robert C. Rhoades, Partial theta functions and mock modular forms as q-hypergeometric series (2012)
