Geometric sum with squared exponentials

44 Views Asked by At

Is there a closed form of the following finite sum? $$ \sum\limits_{n=0}^{N}q^{n^2} $$ where $q>0$. The only thing I found somehow related is the Jacobi $\theta$ elliptic function, but there it is an infinite sum.