Estimate $\sum_{k=1}^{n} k^{k-1} \binom{n}{k} (n-k)^{n+1-k}$ 
I'm interested in estimating
$$X_n=\sum_{k=1}^{n} \binom{n}{k} k^{k-1} (n-k)^{n+1-k}$$
up to and including terms of order $n^n$; that is, I want $f_n$ in
  $X_n=f_n+o\left(n^n\right)$.

The following identity looks very similar but I am not sure how to use it.
$$\sum_{k=0}^n{n \choose k}(k-1)^k(n-k+1)^{n-k-1}= n^n$$
I think the answer should be
$$f_n=\frac{n^n}{2} \left(2+2n-\sqrt{2 \pi n}\right)\;.$$
The question arises from Asymptotics of sum of binomials .
The reason why I am interested is to give the asymptotics of
$$Y=n  + 1 - \sum_{k=1}^{n} k^{k-1} \binom{n}{k} \frac{(n-k)^{n+1-k}}{n^{n}}$$
I believe  that $Y$ equals $1 + \sum_{k=1}^n \frac{n!}{(n-k)!n^k} \sim \sqrt{\frac{\pi n}{2}}$.  (Separate question posted for this identity.)
Update. $X_n$ is oeis A219706.
 A: The upper summation bound can be lowered:
$$
   X_n = \sum_{k=1}^{n-1} \binom{n}{k} k^{k-1} \left(n-k\right)^{n+1-k} \stackrel{k =n-m}{=} \sum_{m=1}^{n-1} \binom{n}{m} m^{m+1} (n-m)^{n-1-m}
$$
The latter representation shows that the ratio of $c_{n-k}/c_k$ is $\left(\frac{k}{n-k}\right)^2$ and is less than 1 for $2k < n$. 
For a fixed $k$, and $n>k$:
$$
     \frac{1}{n^{n+1}} \binom{n}{k} k^{k-1} \left(n-k\right)^{n+1-k} = \mathrm{e}^{-k}\frac{k^{k-1}}{k!} \frac{n! e^{n}}{n^{n+1/2}} \frac{(n-k)^{n-k+1/2} }{(n-k)! \mathrm{e}^{n-k}} \sqrt{\frac{n-k}{n}} < \mathrm{e}^{-k}\frac{k^{k-1}}{k!}
$$
Indeed, asymptotically:
$$ 
   \frac{n! e^{n}}{n^{n+1/2}} \frac{(n-k)^{n-k+1/2} }{(n-k)! \mathrm{e}^{n-k}} \sqrt{\frac{n-k}{n}} = 1 - \frac{k}{2n} - \frac{k(3k+1)}{12 n^2} + \mathcal{o}(n^{-2}) < 1
$$
Therefore:
$$
  X_n < n^{n+1} \sum_{k=1}^{n-1} \mathrm{e}^{-k}\frac{k^{k-1}}{k!} < n^{n+1} \sum_{k=1}^{\infty} \mathrm{e}^{-k}\frac{k^{k-1}}{k!} = n^{n+1} \left(-W\left(-\mathrm{e}^{-1}\right)\right) = n^{n+1}
$$
where $W(x)$ is the Lambert's $W$-function, and we used $W(-\mathrm{e}^{-1})=-1$.

