<s>[INST] Find $\lim\limits_{n \to \infty} \left ( n - \sum\limits_{k = 1} ^ n e ^{\frac{k}{n^2}} \right)$. I have to find the limit:
$$\lim\limits_{n \to \infty} \bigg ( n - \displaystyle\sum_{k = 1} ^ n e ^{\frac{k}{n^2}} \bigg)$$
This is what I managed to do:
$$ e^{\frac{1}{n^2}} + e^{\frac{1}{n^2}} + ... + e^{\frac{1}{n^2}}
\le e^{\frac{1}{n^2}} + e^{\frac{2}{n^2}} + ...e^{\frac{n}{n^2}} \le
e^{\frac{n}{n^2}} + e^{\frac{n}{n^2}} + ... e^{\frac{n}{n^2}}$$
$$ n e^{\frac{1}{n^2}}
\le \displaystyle\sum_{k = 1} ^ n e ^{\frac{k}{n^2}} \le
ne^{\frac{1}{n}}$$
$$ -n e^{\frac{1}{n}}
\le - \displaystyle\sum_{k = 1} ^ n e ^{\frac{k}{n^2}} \le
- n e^{\frac{1}{n^2}}$$
$$ n - n e^{\frac{1}{n}}
\le n - \displaystyle\sum_{k = 1} ^ n e ^{\frac{k}{n^2}} \le
n - n e^{\frac{1}{n^2}}$$
Here I found that the limit of the left-hand side is equal to $-1$, while the limit of the right-hand side is $0$. So I got that:
$$-1 \le n - \displaystyle\sum_{k = 1} ^ n e ^{\frac{k}{n^2}} \le 0$$
And I cannot draw a conclusion about the exact limit. What should I do?
 [/INST] As @Andrei already answered, you face a geometric sum, that is to say that
$$\sum_{k = 1} ^ n e ^{\frac{k}{n^2}}=\sum_{k = 1} ^ n \left(e ^{\frac{1}{n^2}}\right)^k=\frac{e^{\frac{1}{n^2}} \left(e^{\frac{1}{n}}-1\right)}{e^{\frac{1}{n^2}}-1}$$ Now, expanding the exponentials as Taylor series, multiplying for the numerator and then long division, you should get
$$\sum_{k = 1} ^ n e ^{\frac{k}{n^2}}=n+\frac{1}{2}+\frac{2}{3 n}+O\left(\frac{1}{n^2}\right)$$
$$ n - \displaystyle\sum_{k = 1} ^ n e ^{\frac{k}{n^2}}=-\frac{1}{2}-\frac{2}{3 n}+O\left(\frac{1}{n^2}\right) $$ which shows the limit and also how it is approached.
Edit
In comments, @marty cohen made a good point.
If we consider
$$n-\sum_{k = 1} ^ {n^a} e ^{\frac{k}{n^2}}=n-\frac{e^{\frac{1}{n^2}} \left(e^{n^{a-2}}-1\right)}{e^{\frac{1}{n^2}}-1}$$ it will not converge for any $a \neq 1$ since it will be
$(n-n^a+\cdots)$
</s>