TITLE: Summing $\frac{1}{a}-\frac{1}{a^4}+\frac{1}{a^9}-\cdots$
QUESTION [8 upvotes]: This question comes from temperature at sphere center. I think it's a good idea to extract the essence and post a pure mathematical question to attract more thoughts. It is a physical problem and interested readers can go to the original post to find details. 
Anyway, after simplification the wanted value is $2 f(x)$
$$
f(x)= - \sum_{n=1}^{\infty}(-1)^n e^{-x n^2} 
$$
Letting $x = \pi^2 D t /a^2$ gives the answer to the original question. If we further let $e^{x} = a$, we have a summation problem:
$$
S=-\sum_{n=1}^{\infty}(-1)^n a^{-n^2} = \frac{1}{a}-\frac{1}{a^4}+\frac{1}{a^9}-\cdots
$$
$a > 1$ so $S$ converges, but I don't now how to sum it. Any suggestions?

REPLY [6 votes]: We can write this sum in terms of the Jacobi theta function $\vartheta(z;\tau)$; in particular, I believe that
$$\vartheta(\tfrac12;\tfrac{ix}{\pi}) = 1 - 2f(x).$$
That's not an answer: it's just saying "we don't know how to find this sum in terms of functions we know about, so we gave this sum a name".
But maybe looking at the Wikipedia article I linked to will give you some idea of what can be done with the function to find the things about it you're interested in.