$\lim_{n \to \infty} \frac{1}{n} \sum_{r=1}^{\infty} e^{-\frac{r^2}{2n^2}}$ Let $a_n = \frac{1}{n} \sum_{r=1}^{\infty} e^{-\frac{r^2}{2n^2}}$. The sequence is well-defined by considering the ratio test. What then is $\lim_{n \to \infty} a_n$? 
I suspect it is $\sqrt{\pi/2}$, by converting the "riemann sum" into a gaussian integral, but there were some slight details that I'm unable to justify. I've tried using another sequence, $b_{L,n} = \frac{1}{n} \sum_{r=1}^{nL} e^{-\frac{r^2}{2n^2}}$, to help me in the process. $\lim_{n \to \infty} b_{L,n} = \int_0^L e^{-\frac{x^2}{2}} dx$ and $\lim_{L \to \infty} b_{L,n} = a_n$. But to show that $\lim_{n \to \infty} \lim_{L \to \infty} b_{L,n} = \sqrt{\pi/2}$, I can't just swap the order of the limits, can I?
 A: The interchange will work here because $f(x) = e^{-x^2/2}$ is monotone nonincreasing.
We have
$$\int_{r/n}^{(r+1)/n}e^{-x^2/2} \, dx \leqslant \frac{1}{n} e^{-\frac{r^2}{2n^2}} \leqslant\int_{(r-1)/n}^{r/n}e^{-x^2/2} \, dx$$
Summing with the left-hand inequality from  $r=0$ to $r = m$ we get
$$\int_0^{(m+1)/n}e^{-x^2/2} \, dx \leqslant \frac{1}{n}\sum_{r=0}^me^{-\frac{r^2}{2n^2}} =\frac{1}{n} + \frac{1}{n} \sum_{r=1}^me^{-\frac{r^2}{2n^2}} ,$$
and summing with the right-hand inequality from $r= 1$ to $r = m$ we get
$$\frac{1}{n} \sum_{r=1}^me^{-\frac{r^2}{2n^2}} \leqslant \int_0^m e^{-x^2/2} \, dx$$
Thus,
$$\tag{*}\int_0^{(m+1)/n}e^{-x^2/2} \, dx - \frac{1}{n}\leqslant \frac{1}{n}\sum_{r=1}^me^{-\frac{r^2}{2n^2}}\leqslant \int_0^{m/n}e^{-x^2/2}\, dx$$
The limits as $m \to \infty$ of all terms in (*) exist since the series and improper integral are convergent.  Whence,
$$\int_0^{\infty}e^{-x^2/2} \, dx - \frac{1}{n}\leqslant \frac{1}{n}\sum_{r=1}^{\infty}e^{-\frac{r^2}{2n^2}}\leqslant \int_0^{\infty}e^{-x^2/2}\, dx$$
Finally, applying the squeeze theorem in taking the limits as $n \to \infty$, we get
$$\lim_{n \to \infty}\frac{1}{n} \sum_{r=1}^{\infty}e^{-\frac{r^2}{2n^2}} = \int_0^\infty e^{-x^2/2} \, dx $$
