swap $\sum_k^\infty\sum_j^k$ [duplicate]

On page 21 of his book generatingfunctionology (available for free on the author's homepage), the author rearranges the summations in the following way:

\begin{align} b(n) &= \sum^M_{k=1} \sum^k_{r=1} (-1)^{k-r} \frac{r^{n-1}}{(r-1)!(k-r)!} \\ &= \sum^M_{r=1} \frac{r^{n-1}}{(r-1)!} \sum^M_{k=r} \frac{(-1)^{k-r}}{(k-r)!} \end{align}

It is not immediately obvious to me that this is in fact correct. I have convinced myself for some values of $M$ that I indeed get the same set of ordered pairs $(k,r)$. But is there a way that I can immediately show that the second line is equivalent to the first?


Solution 1:

Hint: Maybe the following representation of indices is helpful

\begin{align*} \sum_{k=1}^{M}\sum_{r=1}^{k}b_{r,k}=\sum_{1\leq r\leq k\leq M}b_{r,k}=\sum_{r=1}^{M}\sum_{k=r}^Mb_{r,k} \end{align*}