How to prove that $$u_n=\sum_{k=1}^n\cos\left(\frac kn\right)^{2n^2/k}$$ is a Cauchy sequence?
The exercise I am reading gives as a hint that we should use the inequality: $$0\leq\cos\left(\frac kn\right)^{2n^2/k}\leq e^{-k},$$ for all $k\leq n$.
I tried to estimate $|u_m-u_n|$, but I don't know how to deal with the $n$ inside the sum.
Forget Cauchy sequences. To show the convergence of the sequence $(u_n)$, consider, for every integer positive $(k,n)$, $$v_{k,n}=\cos\left(\frac{k}{n}\right)^{2n^2/k}\mathbf 1_{k\leqslant n}$$ then $$u_n=\sum_{k=1}^\infty v_{k,n}$$ Assume momentarily that, for every $x$ in $[0,1]$, $$\cos x\leqslant e^{-x^2/2}\tag{$\ast$}$$ Then, for every positive $(k,n)$, $$|v_{k,n}|=v_{k,n}\leqslant\left(e^{-k^2/(2n^2)}\right)^{2n^2/k}=e^{-k}$$ and, for every fixed positive $k$, $$\lim_{n\to\infty}v_{k,n}=e^{-k}$$ Thus, by Lebesgue dominated convergence theorem for series, $$\lim_{n\to\infty} u_n=\sum_{k=1}^\infty\lim_{n\to\infty} v_{k,n}=\sum_{k=1}^\infty e^{-k}=\frac1{e-1}$$ To complete the proof, one needs to prove $(\ast)$ but this is direct, considering the derivative of the function $$f(x)=e^{x^2/2}\cos x$$ on $[0,1]$ and using the estimate $\tan x\geqslant x$ on this interval.