Exercise from book:
Show that for all positive integers n $$ \sum_{k=0}^{n}(-1)^{k}\left(\begin{array}{l} n \\ k \end{array}\right) k^{j}= \begin{cases}0, & j=0,1, \ldots, n-1 \\ (-1)^{n} n ! j=n\end{cases} $$
and hint from author:
Hint. Expand $(1-x)^{n}$ by the binomial rule. Repeatedly differentiate, but with a twist.
My question: what does mean differentiate with a twist??
Hint: Expanding $(1-x)^n$ and differentiating $j$ times we get \begin{align*} \frac{d^j}{dx^j}\left((1-x)^n\right)&=\frac{d^j}{dx^j}\left(\sum_{k=0}^n(-1)^k\binom{n}{k}x^k\right)\\ &=\sum_{k=0}^n(-1)^k\binom{n}{k}\color{blue}{k(k-1)\cdots(k-j+1)}x^{k-j}\tag{1} \end{align*} This is near to what we want, but instead of $k(k-1)\cdots(k-j+1)=\frac{k!}{(k-j)!}$ we need $k^j$. We observe that differentiating $e^{kx}$ $j$ times results in \begin{align*} \frac{d^j}{dx^j}\left(e^{kx}\right)=\color{blue}{k^j}e^{kx} \end{align*} So, we can add a twist to (1) by differentiating \begin{align*} \color{blue}{\left(1-e^{kx}\right)^n} \end{align*} $j$ times instead of $(1-x)^n$ and then evaluating at $x=0$.