Alternating sum of binomial coefficients multiplied by index to an n-2 extent

Let write the required series as $$ S_n=\sum_{i=1}^{n} (-1)^i~ i^{n-2} ~ {n\choose i}\tag 1$$ Let us consider an interesting function $$f(x)=(1-e^{x})^n = 1~-~n e^{x}+\frac{n(n-1)}{2!} e^{2x}-\frac {n(n-1)(n-2)}{3!} e^{3x}+....(n+1)~ \mbox{terms}\tag 2$$ Next the coefficient of $x^{n-2}$ in the RHS of $(2)$ is $$-\frac{n}{1!} \frac{1^{n-2}}{(n-2)!}+\frac{n(n-1)}{2!} \frac{2^{n-2}}{(n-2)!}-\frac{n(n-1)(n-2)}{3!} \frac{3^{n-2}}{(n-2)!}+....=\frac{S_n}{(n-2)!} \tag 3$$ Also, the coefficient of $x^{n-2}$ in $f(x)$ can be obtained from $$f(x)=(-1)^n (e^x-1)^n = (-1)^n \left ( x^n+\frac{n}{2}x^{n+1}+...\right),$$ where there are terms having higher powers of $x$, namely $x^n$ on wards. It therefore follows that $S_n=0.$


This is a variation using the coefficient of operator $[z^n]$ to denote the coefficient of $z^n$ in a series. Recalling $e^z=\sum_{j=0}^\infty \frac{z^j}{j!}$ we can write for instance \begin{align*} n![z^n]e^{kz}=k^n\tag{1} \end{align*}

We obtain for $n>2$ \begin{align*} \color{blue}{\sum_{k=1}^n}&\color{blue}{(-1)^kk^{n-2}\binom{n}{k}}\\ &=\sum_{k=1}^n(-1)^k\binom{n}{k}(n-2)![z^{n-2}]e^{kz}\tag{2}\\ &=(n-2)![z^{n-2}]\sum_{k=1}^n\binom{n}{k}\left(-e^{z}\right)^k\\ &=(n-2)![z^{n-2}]\left(\left(1-e^z\right)^n-1\right)\tag{3}\\ &=(n-2)![z^{n-2}]\left((-1)^n\left(z+\frac{z^2}{2}+\cdots\right)^n-1\right)\tag{4}\\ &\,\,\color{blue}{=0} \end{align*}

Comment:

  • In (2) we apply the coefficient of operator according to (1)

  • In (3) we apply the binomial theorem.

  • In (4) we observe the coefficient of $z^{n-2}$ is zero since the left term starts with powers in $z$ greater or equal to $n$ and the constant $-1$ does not contribute since $n>2$.

Hint: Instructive examples using this and related techniques can be found in H.S. Wilf's book generatingfunctionology. See the examples following (1.2.6).


My favorite proof of the probably most general form of the identity starts with the claim: $$\frac{d^m}{dx^m}(e^x-1)^n=\sum_{k=0}^m {m \brace k}\frac{n!}{(n-k)!} (e^x-1)^{n-k}e^{kx},\tag1 $$ which can be easily proved by induction over $m$ using the well-known summation property of the Stirling numbers of the second kind: $$ {m \brace k-1}+k{m \brace k}={m+1 \brace k}. $$

Now consider the obvious equality: $$ (e^x-1)^n=\sum_{k=0}^n (-1)^{n-k}\binom nk e^{kx}.\tag2 $$ Differentiating both sides $m$ times with respect to $x$ and substituting $x=0$ in the resulting expression: $$\sum_{k=0}^m {m \brace k}\frac{n!}{(n-k)!} (e^x-1)^{n-k}e^{kx}=\sum_{k=0}^n (-1)^{n-k}\binom nk k^me^{kx},\tag3 $$ one obtains: $$ \boxed{{m \brace n}n!=\sum_{k=0}^n (-1)^{n-k}\binom nk k^m}\tag4 $$ since only $k=n$ can provide a non-zero term in the left hand side sum upon the substitution. Particularly for $m<n$ the sum is $0$ and your claim follows.