Is there a way of simplifying $ \sum_{k=2}^{n} ke^{-a(k-2)^2}$?
Let’s use the following to get 2 infinite series:
$$\sum_{n=1}^b a^n=\sum_{n=0}^\infty a_n -\sum_{n=b}^\infty a_n$$
Therefore:
$$\sum_{k=2}^{n} ke^{-a(k-2)^2} = \sum_{k=2}^{\infty} ke^{-a(k-2)^2} -\sum_{k=n}^\infty ke^{-a(k-2)^2}= \sum_{k=0}^{\infty} ke^{-ak^2} -\sum_{k=0}^\infty (k+n)e^{-a(k+n-2)^2}$$
Now can you find a solution in terms of theta functions? Try differentiating The third Jacobi Theta function to find a closed form. Please correct me and give me feedback!