I would like to find
$$a_n =\sum_{r=1}^n e^{-\alpha r^2},\qquad \alpha\in\mathbb{R}$$
I tried to solve the equivalent recursion
$$a_n=a_{n-1}+e^{-\alpha n^2}\quad(n>0),\qquad a_0=0.$$
with an ordinary generating function $G(z)=\sum a_n z^n$, for which I came to
$$G(z)(1-z)=\sum_{n\geq 0}e^{-\alpha n^2}z^n.$$ But from there on I got stuck.