Why is $\sum_{n=-\infty}^{\infty}\exp(-(x+n)^2)$ "almost" constant? I did some numerical approximation of $$\sum_{n=-\infty}^\infty \exp(-(x+n)^2)$$ and found that this function is "almost" constant ($\approx 1.772$). Why does the sum fluctuate little? Is there a closed form for this sum?
Added: since $f(x) = \sum_{n=-\infty}^\infty \exp(-(x+n)^2)$ has period $1$ and is even, can we give an upper bound of $\sup\{ f(x)/f(y) : (x,y)\in [0,0.5]^2\}$?
 A: Recall the general case of the Poisson sum formula:
$$\sum_{-\infty}^\infty f(x+n)
=\sum_{k=-\infty}^\infty e^{2\pi i k x} 
\int_{-\infty}^{\infty} e^{-2\pi i k y}f(y)\,dy$$ 
Then 
$\displaystyle\int_{-\infty}^{\infty} e^{-2\pi i k y}e^{-y^2}\,dy$ is a Gaussian integral, and (skipping the tedious step of completing the square) evaluates to 
$\sqrt{\pi} e^{ -k^2 \pi^2}$. So
$$\sum_{-\infty}^\infty e^{-(x+n)^2}
= \sqrt{\pi}\sum_{k=-\infty}^\infty e^{2\pi i k x} e^{-k^2 \pi^2}=\sqrt{\pi}+2\sqrt{\pi}\sum_{k=1}^\infty e^{-k^2 \pi^2}\cos 2\pi kx $$
Observe that this means that the function has an average value of $\sqrt\pi$, and that we have a tower of corrections which are each exponentially smaller than the last. To a very good approximation, then, we can take the function to be $$\sqrt\pi+2\sqrt\pi e^{-\pi^2} \cos 2\pi x$$ with a variation around the value $\sqrt\pi\approx1.77245$ of merely $\pm2\sqrt\pi e^{-\pi^2}\approx\pm0.0002$. So the function is very flat.
This is also consistent with Dmoreno's observation that the sum is a Jacobi theta function, since the argument above amounts to a proof that $\vartheta_3(x;\tau)$ has its known Fourier expansion
$$\vartheta_3(z,q)=\sum_{-\infty}^\infty q^{n^2}e^{2 i n z}=1+2\sum_{n=1}^\infty q^{n^2} \cos 2n z$$
for the case $q=e^{-\pi^2},$ $z=\pi x$.
Added:
We can generalize the above calculation to obtain the sum 
$$\sum\limits_{-\infty}^\infty \exp\left[-\left(\dfrac{x+n}{a}\right)^2\right]
=\sqrt{\pi}|a|\vartheta_3(\pi x,e^{-\pi^2 a^2})=\sqrt{\pi}|a|\left[1+2\sum_{k=1}^\infty e^{-\pi^2 a^2 k^2} \cos(2\pi k x)\right]$$
Observe that if we pick $a$ to be small, then $e^{-a^2 \pi^2}$ (formally the elliptic nome $q$) need not be small. In that case the approximation given earlier breaks down. The cases $a=\pi^{-1}$ and $a=(2\pi)^{-1}$ give striking examples, as evident in these WolframAlpha plots [1] [2]: the sums definitely aren't flat!
To explain this in less formal terms, note that the sum consists of an infinite set of shifted Gaussians $\{e^{-(x+n)/a^2}\}$. If $a$ is small, then each Gaussian is narrowly peaked and does not overlap much with its neighbors; consequently, the sum of all of them together leads to a 'comb' of narrow peaks. But if $a$ is not small--and $a=1$ is not--then each Gaussian overlaps strongly with its neighbors, and so the resulting 'comb' due to the sum has its gaps mostly filled in (i.e. nearly flat.)
A: Well, according to Mathematica:
$$\sum_{n=-\infty}^{\infty}\exp(-(x+n)^2) = \sqrt{\pi} \, \vartheta_3(\pi x, e^{-\pi^2}),$$ where $\vartheta_a(x,q)$ is the elliptic theta function.
Edit: a plot of the result as a function of $x$ when $x \in {(-10,10)}$ reveals an almost flat graph.
A: I'm not sure that this question can really have a conclusive answer, but here is something to think about.
Denoting the sum by $f(x)$, it is easy to show by shifting the variable of summation that $f(x)=f(x+1)$, that is, $f$ has period $1$.  Moreover, $f(x)=f(-x)$.  Therefore, all values of $f(x)$ are determined by its values on $0\le x\le\frac{1}{2}$.  Since this is a short interval, you might reasonably expect that the values of $f(x)$ would not vary by much - though obviously you could make up an example where they did.
