9

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.

  • Change index in the identity you are citing from $k$ to $m+1$ so $k-1 \to m$ and convert $\binom{n,m+1}$ to $\binom{n,m}$ by multiplying by the right things, that could clear hings up considerably – gt6989b Apr 18 '13 at 13:27
  • 1
    What does "the asymptotics" and "the answer" refer to here? If your asymptotic result is correct, then $X\sim n^{n+1}$ is also a correct answer. – joriki Apr 18 '13 at 13:28
  • @joriki Oh you are right. Hmm.. I need those lower order terms too. Can you help me rephrase it? –  Apr 18 '13 at 13:31
  • @motl737: I tried -- is this what you meant? – joriki Apr 18 '13 at 13:38
  • @joriki Yes, thanks! I also added the full background at the end to make it clearer. –  Apr 18 '13 at 13:40
  • Why are the two expressions for $Y$ equal? – joriki Apr 18 '13 at 14:50
  • 1
    @gt6989b: When that happens, you can edit your comment for up to five minutes to correct the errors. – joriki Apr 18 '13 at 14:51
  • @joriki I asked that exact question separately. They do appear to be identical however if you compute them numerically. –  Apr 18 '13 at 15:13
  • @joriki Thanks, could not figure out then how to correct it, now I remembered it's 2 parameters, not through a comma. Thanks – gt6989b Apr 18 '13 at 16:53

2 Answers2

4

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$.

enter image description here

Sasha
  • 70,631
4

Here is my version (up to computaitonal errors). Information on Lambert's W function $W(z)$ can be found in (Corless, Gonnet, Hare, Jeffrey, & Knuth, "On the Lambert W Function"). Begin with \begin{equation*} -W(-z) = \sum_{n=1}^\infty \frac{n^{n-1}}{n!}\,z^n \tag{1} \end{equation*} The radius of covergence is $e^{-1}$. It is analytic beyond the circle $|z|=e^{-1}$ everywhere except the point $e^{-1}$, where it has a quadratic branch point. We may expand at that point: $$ -W(-z) = 1 - \sqrt{2}(1-ez)^{1/2} + \frac{2}{3}(1-ez) -\frac{11\sqrt{2}}{36}(1-ez)^{3/2} +\dots $$ as $z \to e^{-1}$ from the left (that is, $z$ approaches from inside the circle of convergence). From (1), differentiate then multiply by $z$ to get $\sum n^{n} z^n/n!$. Again, differentiate then multiply by $z$ to get $\sum n^{n+1} z^n/n!$. The result is \begin{equation*} \frac{-W(-z)}{\big(1+W(-z)\big)^3} =\sum_{n=0}^\infty \frac{n^{n+1}}{n!}z^n \tag{2}\end{equation*} Multiply (1) and (2) to get \begin{align*} h(z) &:= \frac{W(-z)^2}{\big(1+W(-z)\big)^3} = \sum_{n=1}^\infty \left(\sum_{k=1}^n \frac{k^{k-1}}{k!}\; \frac{(n-k)^{n-k+1}}{(n-k)!}\right)z^n \\ &= \sum_{n=1}^\infty\left(\frac{1}{n!} \sum_{k=1}^n \binom{n}{k} k^{k-1}(n-k)^{n-k+1}\right)z^n =: \sum_{n=1}^\infty c_n z^n \tag{3}\end{align*} The singularity for $h(z)$ nearest the origin is again at $z=e^{-1}$, and the expansion there is \begin{align*} h(z) = \frac{1}{2\sqrt{2}}(1-ez)^{-3/2} &-\frac{1}{2}(1-ez)^{-1} -\frac{1}{8\sqrt{2}}(1-ez)^{-1/2} \\ & +\frac{149}{540} -\frac{767}{8640\sqrt{2}}(1-ez)^{1/2} +O\big((1-ez)\big) \end{align*} as $z \to e^{-1}$ from the left.

Now, we use a theorem of Szegö (or Darboux?) to deduce the asymptotics of the coefficents of power series $h(z)$. (Szegö, Orthogonal Polynomials, Theorem 8.4; quoted in Wilf, generatingfunctionology, 1st edition, Theorem 5.3.2). We have an asymptotic series, as $n \to \infty$ \begin{align*} c_n &\approx e^n\Bigg[\frac{1}{2\sqrt{2}}\binom{n+1/2}{n} -\frac{1}{2}\binom{n}{n} -\frac{1}{8\sqrt{2}}\binom{n-1/2}{n} \\ & \qquad\qquad +\frac{149}{540}\binom{n-1}{n} -\frac{767}{8640\sqrt{2}}\binom{n-3/2}{n} +\dots \Bigg]& \\ c_n &= e^n \Bigg[\frac{1}{2\sqrt{2}}\left(\frac{2}{\sqrt{\pi}}n^{1/2}+ \frac{3}{4\sqrt{\pi}}n^{-1/2} -\frac{7}{64\sqrt{\pi}}n^{-3/2} +O\left(n^{-5/2}\right)\right) -\frac{1}{2}\big(1\big) \\ & \qquad\qquad -\frac{1}{8\sqrt{2}}\left(\frac{1}{\sqrt{\pi}}n^{-1/2} -\frac{1}{8\sqrt{\pi}} n^{-3/2}+O\left(n^{-5/2}\right)\right) +\frac{149}{540}\big(0\big) \\ & \qquad\qquad -\frac{767}{8640\sqrt{2}}\left(-\frac{1}{2\sqrt{\pi}}n^{-3/2} +O\left(n^{-5/2}\right)\right) +O\left(n^{-5/2}\right)\Bigg] \\ &= e^n\left[\frac{1}{\sqrt{2\pi}}n^{1/2} -\frac{1}{2} +\frac{1}{4\sqrt{2\pi}} n^{-1/2} +\frac{23}{4320\sqrt{2\pi}}n^{-3/2} +O\left(n^{-5/2}\right)\right] \tag{4}\end{align*} Now from (3) we see that the required expression is $n! c_n$. So we need the asymptotic expression \begin{align*} n! &= e^{-n} n^n \sqrt{2\pi}\left( n^{1/2}+\frac{1}{12}n^{-1/2}+\frac{1}{288}n^{-3/2} +O\left(n^{-5/2}\right) \right) \tag{5}\end{align*} Multiply (4) and (5) to get \begin{align*} &\sum_{k=1}^n \binom{n}{k} k^{k-1}(n-k)^{n-k+1} = n!c_n \\ &\qquad = n^n\Bigg( n -\frac{\sqrt{2\pi}}{2} n^{1/2} + \frac{1}{3} -\frac{\sqrt{2\pi}}{24} n^{-1/2} +\frac{4}{135}n^{-1} -\frac{\sqrt{2\pi}}{576}n^{-3/2} +O\left(n^{-2}\right)\Bigg) \end{align*}

GEdgar
  • 111,679
  • So I agree with the two most significant terms, but not the third term. I get $1/3$ and not the predicted $1$. – GEdgar Apr 19 '13 at 00:07
  • 1
    This is a great answer and you are right about the $1/3$ as well (see http://en.wikipedia.org/wiki/Birthday_problem#Average_number_of_people ). Would you be able to apply the same type of reasoning (please) to http://math.stackexchange.com/questions/361452/asymptotics-of-sum-of-binomials where the current answer isn't quite right asymptotically I think. –  Apr 19 '13 at 07:49