# A question about $\lim_{n\to\infty} \left(n-\sum_{k=1}^n e^{\frac{k}{n^2}}\right)$

I stumbled into a mistake when I evaluated $$L=\lim_{n\to\infty} \left(n-\sum_{k=1}^n e^{\frac{k}{n^2}}\right)$$ My first try: $$L=-\lim_{n\to\infty} \sum_{k=1}^{n}\left(e^{\frac{k}{n^2}}-1\right)=-\lim_{n\to\infty} \sum_{k=1}^{n}\left(\frac{e^{\frac{k}{n^2}}-1}{\frac{k}{n^2}}\frac{k}{n^2}\right)=-\lim_{n\to\infty} \sum_{k=1}^{n}\frac{k}{n^2}$$$$L=-\frac{1}{2}\lim_{n\to\infty}\frac{n(n+1)}{n^2}=-\frac12$$ Now this looks pretty clear, however I don't understand what is wrong with the following approach. $$L=\lim_{n\to\infty}(n-(e^\frac{1}{n^2}+e^\frac{2}{n^2}+\cdots + e^\frac{n}{n^2}))=\lim_{n\to\infty} ((1-e^\frac{1}{n^2})+(1-e^\frac{2}{n^2})+\cdots + (1-e^\frac{n}{n^2}))$$ since $$\lim_{n\to\infty} e^\frac{k}{n^2}\,=1$$ gives each term to be $(1-1)=0$ implying the limit to be 0. Please explain to me where I went wrong.

• Same as with $$\lim_{n \to \infty} \sum_{k = 1}^n \frac{1}{n} \neq 0\,.$$ The number of terms grows with $n$. – Daniel Fischer Jul 15 '18 at 17:33
• sorry, I don't see the analogy, there is a divergent sum, but here we also have $n-$ that sum. – user556151 Jul 15 '18 at 17:41
• You can't say because everyone element in $\sum(1-e^\frac{k}{n²})$ converge to 0 by its own it means that all of them together converge to 0, you add more and more elements such that each one individually goes to 0 "slower" then the speed you are adding the elements – Holo Jul 15 '18 at 17:46
• My example is not a divergent sum, it's writing $1$ as a sum of $n$ equal terms. The term $a(k,n) = \frac{1}{n}$ tends to $0$ as $n \to \infty$ for every fixed $k$, but the increase in the number of terms summed compensates the decrease of each term. Just like in your $1 - e^{k/n^2}$ example. – Daniel Fischer Jul 15 '18 at 17:48
• sorry, I didn't saw it's not $k$ In the sum. Well we have $\frac1n \sum_{k=1}^n =\frac1n n=1$ isn't this just a fake sum? – user556151 Jul 15 '18 at 17:53

## 1 Answer

You have a sum of the form $\sum_{k=1}^{n} a(k,n),$ where for each fixed $k,$ $\lim _{n\to \infty}a(k,n) = 0.$ Does that imply $\lim _{n\to \infty}\sum_{k=1}^{n} a(k,n) =0?$ Certainly not. Almost any Riemann sum situation is a counterexample. For example, $\sum_{k=1}^{n} k/n^2\to 1/2.$