Calculating convergence of a sum I have the sum:
$$S=\sum_{n=1}^\infty\frac{n!}{n^n}$$
and I am using D'Alembert's test for convergence which states for some sum:
$$\sum_{n=a}^\infty u_n\,\,(a\neq\pm\infty)$$
that it is convergent if:
$$\lim_{n\to\infty}\left|\frac{u_{n+1}}{u_n}\right|<1$$
so to begin with I know that:
$$L=\lim_{n\to\infty}\frac{\frac{(n+1)!}{(n+1)^{n+1}}}{\frac{n!}{n^n}}=\lim_{n\to\infty}\frac{n^n}{(n+1)^n}$$
Up to this point is fine but I am unsure if what I have done next is correct:
$$\ln(L)=\lim_{n\to\infty}n\ln\left(\frac{n}{n+1}\right)=\lim_{n\to\infty}\frac{\ln\left(1-\frac{1}{n+1}\right)}{\frac{1}{n}}$$
now I used the substitution $u=\frac{1}{n+1}$ and with rearrangement I believe I can obtain:
$$\ln(L)=\lim_{u\to0}\frac{(1-u)\ln(1-u)}{u}$$
now since when $u\to0$ both the top and bottom also tend to $0$ I can use L'Hopitals rule:
$$\ln(L)=\lim_{u\to0}\frac{-1-\ln(1-u)}{1}=\lim_{u\to0}-\bigl(1+\ln(1-u)\bigr)=-1$$
which now gives:
$$\ln(L)=-1\therefore L=e^{-1}\approx0.368<1$$
and so there is convergence
In the question it states that I will have to use:
$$\lim_{n\to\infty}\left(1+\frac1n\right)^n=e$$

Yes that's correct, more simply  form here
$$\frac{n^n}{(n+1)^n}=\frac1{\left(1+\frac1n\right)^n} \to \frac1e$$
