How do I evaluate $\lim_{n\to\infty} \,\sum_{k=1}^n\left(\frac{k}{n^2}\right)^{\frac{k}{n^2}+1}$? I came across the following problem recently in a problem sheet aimed at high school students:

Evaluate $$\lim_{n\to\infty} \,\sum_{k=1}^n\left(\frac{k}{n^2}\right)^{\frac{k}{n^2}+1}.$$

I tried to rewrite the inner sum as a Riemann sum hoping that the limit would become a definite integral, but no gain because of the extra $1/n$'s.
 A: Adding to @NinadMunshi 's answer
For those who didn't understand why, for $n>e$, $$\left(\frac{1}{n}\right)^{\frac{1}{n}} < \left(\frac{k}{n^2}\right)^{\frac{k}{n^2}} < \left(\frac{1}{n^2}\right)^{\frac{1}{n^2}}$$, the graph of $f(x)=x^x$ starts increasing after $x=1/e$ for $f^\prime(x)=(1+\ln x)e^{x\ln x}=(1+\ln x)x^x$.
A: We can rewrite the sum as
$$S = \lim_{n\to\infty}\sum_{k=1}^n \left(\frac{k}{n^2}\right)^{\frac{k}{n^2}}\cdot\frac{k}{n}\cdot\frac{1}{n}$$
We also have that for $1\leq k \leq n$
$$\left(\frac{1}{n}\right)^{\frac{1}{n}} \leq \left(\frac{k}{n^2}\right)^{\frac{k}{n^2}} \leq \left(\frac{1}{n^2}\right)^{\frac{1}{n^2}}$$
for $n > e$. Thus we can sandwich the original limit
$$\lim_{n\to\infty} \left(\frac{1}{n}\right)^{\frac{1}{n}} \cdot \sum_{k=1}^n \frac{k}{n}\cdot\frac{1}{n} \leq S \leq \lim_{n\to\infty} \left(\frac{1}{n^2}\right)^{\frac{1}{n^2}} \cdot \sum_{k=1}^n \frac{k}{n}\cdot\frac{1}{n}$$
which means that
$$S = \lim_{n\to\infty} \sum_{k=1}^n \frac{k}{n}\cdot\frac{1}{n} = \int_0^1x\:dx = \frac{1}{2}$$
by squeeze theorem.
