I am looking for a closed form of the expression
$$F(x) = \sum _{n=1}^\infty x^{n^2} $$
The question arose when I attempted to prove Lagrange's four square theorem via generating functions. It doesn't seem the closed form exists, but I couldnt find any confirmation in the literature.
Using parity to extend the summation to all integers, one can recognize in the resulting expression Jacobi theta function $\vartheta_3(z,q)=\sum_{n\in\mathbb Z}q^{n^2} e^{2ni z}$. More precisely, we have $$\sum_{n=1}^{\infty}x^{n^2}=\frac{\vartheta_3(0,x)-1}{2}.$$