I'm trying to follow the (rather short) proof given in Makarov's Selected Problems in Real Analysis for the following statement: $\lim_\limits{n\to\infty} \sum\limits_{k=1}^{n}\Big(\frac{k}{n}\Big)^n = \frac{e}{e-1}$. I find a key part of it difficult to understand:
$\sum\limits_{k=n-\sqrt[3]{n}}^{n}\Big(\frac{k}{n}\Big)^n = \sum\limits_{j=0}^{\sqrt[3]{n}} \Big(1-\frac{j}{n}\Big) ^{n-j} = \sum\limits_{j=0}^{\sqrt[3]{n}} e^{-j} \Big(1+O\Big(\frac{j^2}{n}\Big)\Big)$
I don't fully understand the last equality. How can it be proved? And why is the there $j^2$ there? Intuitively, it seems to me that the same equality with $O(\frac{1}{n})$ is correct as well, isn't it?
Thanks for your kind help!
We have
$$\begin{align} \left(1-\frac{j}{n}\right)^{n-j}&=e^{(n-j)\log \left(1-\frac jn\right)}\\\\ &=e^{(n-j) \left(-\frac jn+O\left(\frac{j}{n}\right)^2\right)}\\\\ &=e^{-j}e^{\left(\frac {j^2}n+O\left(\frac{j^3}{n^2}\right)\right)}\\\\ &=e^{-j}\left(1+O\left(\frac{j^2}{n}\right)\right) \end{align}$$