MathLabs

Problem 1

Let pn(k)p_n(k) be the number of permutations of the set {1,…,n}\{1, \ldots, n\}, n≥1n \ge 1, that have exactly kk fixed points. Prove that ∑k=0nk⋅pn(k)=n!\sum_{k=0}^{n} k \cdot p_n(k) = n!. (A permutation ff of a set SS is a one-to-one mapping of SS onto itself; an element ii of SS is a fixed point of ff if f(i)=if(i) = i.)
Step 3 of 4: Sum the count over all n choices of i
In plain words

There are nn possible elements to hold fixed, and each contributes the same count (n−1)!(n-1)!, so simply multiply.

#{(f,i):f(i)=i}=∑i=1n(n−1)!=n⋅(n−1)!\#\{(f,i): f(i)=i\} = \sum_{i=1}^{n} (n-1)! = n \cdot (n-1)!
Detailed analysis

Summing the count from the previous step over every choice of i∈{1,…,n}i \in \{1,\ldots,n\} gives the total number of pairs (f,i)(f,i) with f(i)=if(i)=i: ∑i=1n(n−1)!=n⋅(n−1)!\sum_{i=1}^{n}(n-1)! = n\cdot(n-1)!.