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 2 of 4: Count permutations fixing one chosen element
In plain words

Pin down where ii goes — namely, back to itself — and the rest of the permutation is free to do anything to the other n−1n-1 elements.

#{f:f(i)=i}=(n−1)!for each fixed i∈{1,…,n}\#\{f : f(i)=i\} = (n-1)! \quad \text{for each fixed } i \in \{1,\ldots,n\}
Detailed analysis

Fix an element i∈{1,…,n}i \in \{1,\ldots,n\}. A permutation ff with f(i)=if(i)=i is completely determined by how it permutes the remaining n−1n-1 elements {1,…,n}∖{i}\{1,\ldots,n\}\setminus\{i\} among themselves, and every such rearrangement is allowed. Hence there are exactly (n−1)!(n-1)! permutations of {1,…,n}\{1,\ldots,n\} that fix ii.