TITLE: Alternating power series $\sum_{k\geq 0}(-1)^k z^{(2k+1)^2}$
QUESTION [6 upvotes]: Suppose that $f(x):=\sum_{k\geq 0}(-1)^ke^{-(2k+1)^2x}$ has a holomorphic continuation to a neighborhood of $0$, that is, $f(x)=\sum_{n\geq 0}a_n x^n$ for $x> 0$ small. I want to know the value of $a_1$. Let $z=e^{-x}$, $g(z):=\sum_{k\geq 0}(-1)^k z^{(2k+1)^2}$; then, formally, $g'(1)$ is what we want to compute. Note that $1$ is on the circle of convergence of $g$ so differentiating term-wise is not guaranteed.

REPLY [5 votes]: We can indeed prove, as already suspected by მამუკა ჯიბლაძე, that
$g(z)=\sum (-1)^k z^{(2k+1)^2}$ cannot be holomorphically continued past $z=1$. In fact, every point on $|z|=1$ is singular. This is a consequence of the following rather general version of the classical results on lacunary power series:

Theorem: Suppose that $a_n$ is bounded. Suppose further that there exists a sequence $n_j\to\infty$ such that: (1) $|a_{n_j}|\ge\delta>0$; (2) $a_{n_j-k}\to 0$ as $j\to\infty$ for every fixed $k\ge 1$.
  Then $\sum a_n z^n$ cannot be holomorphically continued to any open set larger than the unit disk.

(Note that $R=1$ under these assumptions.)
Of course, this applies to our power series, with $n_j=(2j+1)^2$.
A very elegant proof of the Theorem was recently given by Breuer-Simon. See reference 328 here, Theorem 1.6 of the paper.