We denote $p_{k}$ as the number of permutations of the set $\{1, \ldots, n\}$ having $k$ fixed points. Calculate:

$$
\sum_{i=0}^{n} k p_{k}
$$

## And other delights
It is about calculating the total number of fixed points for all permutations of $\{1, \ldots, n\}$. There are $(n-1)!$ permutations that fix $1$, $(n-1)!$ permutations that fix $2$, etc. We deduce that the total number of fixed points is equal to $n \times (n-1)! = n!$.