While I was considering random walk on $S^1$, I needed to compute the following.
$$\lim_{m\rightarrow\infty}\sum_{k=1}^m \left(\cos{\frac{2\pi k}{2m+1}}\right)^{(2m+1)^2}$$
I guessed it should converges to trace of heat kernel on $S^1$. So I tried to use Mathematica. Mathematica says, it converges to following series:
$$\sum_{k=1}^\infty e^{-2\pi^2k^2}$$
But how can we prove this is true?
of course, proving $$\lim_{m\rightarrow\infty}\left(\cos{\frac{2\pi k}{2m+1}}\right)^{(2m+1)^2}=e^{-2\pi^2k^2}$$ is easy for each fixed $k$ (one can apply l'hospital rule or use taylor expansion).
But I don't know how to show $$\lim_{m\rightarrow\infty}\sum_{k=1}^m \left(\cos{\frac{2\pi k}{2m+1}}\right)^{(2m+1)^2}=\sum_{k=1}^\infty e^{-2\pi^2k^2}$$.
-Generalized version of above question is the following one: suppose a doubly indexed sequence $\{a_{mk}\}_{m\in\mathbb{N},1\leq k\leq m}$ and a sequence $\{b_k\}_{k=1}^\infty$ satisfy following two conditions:
(1) $\lim_{m\rightarrow\infty}a_{mk}=b_k$ for each positive integer $k$.
(2) $\sum_{k=1}^\infty b_k$ converges.
Then, can we conclude $\lim_{m\rightarrow\infty}\sum_{k=1}^m a_{mk}=\sum_{k=1}^\infty b_k$? In general it is not true (consider $a_{mk}=b_k+m^{-1/2}$). To make the limit true, what kinds of additional assumptions do we need? Maybe there is some known result about this general question?
A sketch:
By exploiting symmetry of the sum, we can rewrite it as
$$ \begin{align} &\sum_{k=1}^m \left(\cos{\frac{2\pi k}{2m+1}}\right)^{(2m+1)^2} \\ &\qquad = \sum_{k=1}^{m/2} \left(\cos{\frac{\pi 2k}{2m+1}}\right)^{(2m+1)^2} - \sum_{k=1}^{m/2} \left(\cos{\frac{\pi (2k-1)}{2m+1}}\right)^{(2m+1)^2}, \tag{$*$} \end{align} $$
assuming $m$ is even. For fixed $k$ we have
$$ \lim_{m \to \infty} \left(\cos{\frac{\pi 2k}{2m+1}}\right)^{(2m+1)^2} = e^{-(\pi 2k)^2/2} $$
and
$$ \lim_{m \to \infty} \left(\cos{\frac{\pi(2k-1)}{2m+1}}\right)^{(2m+1)^2} = e^{-(\pi(2k-1))^2/2}. $$
Then, applying the dominated convergence theorem to each sum in $(*)$ using the domination relationships
$$ \left(\cos{\frac{\pi 2k}{2m+1}}\right)^{(2m+1)^2} \leq e^{-(\pi 2k)^2/2} $$
and
$$ \left(\cos{\frac{\pi(2k-1)}{2m+1}}\right)^{(2m+1)^2} \leq e^{-(\pi(2k-1))^2/2} $$
yields
$$ \begin{align} \lim_{m \to \infty} \sum_{k=1}^m \left(\cos{\frac{2\pi k}{2m+1}}\right)^{(2m+1)^2} &= \sum_{k=1}^{\infty} \left(e^{-(\pi 2k)^2/2} - e^{-(\pi(2k-1))^2/2}\right) \\ &= \sum_{k=1}^{\infty} (-1)^k e^{-(\pi k)^2/2}. \end{align} $$
Mathematica can evaluate this sum in terms of elliptic functions, and its numerical value is
$$ \sum_{k=1}^{\infty} (-1)^k e^{-(\pi k)^2/2} \doteq -0.00719\ 18806\ 80538\ 37459. $$
In comparison, the Mathematica command
returns the numerical approximation of the original sum when $m = 200$
$$ \left. \sum_{k=1}^m \left(\cos{\frac{2\pi k}{2m+1}}\right)^{(2m+1)^2} \right|_{m = 200} \doteq -0.00719\ 152. $$