Hi! I've stumbled upon a convergent sum of the form:

$\displaystyle S(k) = \sum_{n = 0}^{\infty}{k^{n^2}}$

This sum converges for every $\displaystyle k$ with $\displaystyle |k| < 1$. I've checked properties of the function numerically (for real values of $\displaystyle k$) and found that for $\displaystyle |k|$ close to zero the function goes approximately as $\displaystyle S(k) = k + 1$. I need to find an expression for the function for $\displaystyle k$ close to 1. I've already found that it goes as $\displaystyle S(k) = C(k)(1 - k)^{\beta}$, where $\displaystyle \beta \approx -\frac{1}{2}$ and $\displaystyle C(k)$ is another function that goes to some finite constant of approximately 0.89 as $\displaystyle k$ goes to 1. I'd be happy if anyone knows an analytic expression of the function (exact or approximate for $\displaystyle k$ close to 1).

Thanks in advance.

/Simon