The problem is to count how many permutations in $S_n$ have no fixed points. Let call this number $f(n)$, and define the set $N=\{1,\ldots,n\}$.
The 'classic' solution is using the exclusion-inclusion principle to get
\begin{align*}n!&=f(n)+\sum_{k=1}^n\sum_{A\subseteq N,\#A=k}(-1)^k\#\{\sigma\in S_n: j\in A\to\sigma(j)=j\}\\ &=f(n)+\sum_{k=1}^n(-1)^k\binom nk(n-k)!\\ &=f(n)+n!\sum_{k=1}^n\frac{(-1)^k}{k!}\end{align*}
My alternative try:
I have tried to define recursively the sequence $f(n)$ as follows:
Let $B(A)=\#\{\sigma\in S_n: \sigma(j)=j \leftrightarrow j\in A\}$ for $A\subseteq N$ (note the 'iff' in the definition).
$$f(0)=1$$
\begin{align*} f(n)&=n!-\sum_{k=0}^{n-1}\sum_{A\subseteq N,\#A=k}B(A)\\ &=n!-\sum_{k=0}^{n-1}\binom nkf(n-k)\\ &=n!-\sum_{k=0}^{n-1}\binom nkf(k)\end{align*}
My question:
I'm struggling if there is a way to get the former result from the latter (that is, to solve the reecursive equation) avoiding the exclusion-inclusion principle, i.e,. by purely 'algebraic' means.
My thoughts:
This suggests that I should prove that
$$n!\sum_{k=1}^n\frac{(-1)^k}{k!}=\sum_{k=0}^{n-1}\binom nkf(k)$$
I have tried induction to no avail so far.
Another alternative way
Since a permutation can be expressed uniquely as a product of disjoint cycles, we can solve the problem for $n=7$ this way:
A permutation with no fixed points can be expressed as a product of disjoint cycles of order $\ge 2$.
- If the order of cycles are 2-2-3, there are $\frac{\binom 72\binom 52\binom 33(2-1)!(2-1)!(3-1)!}{2!}=210$ permutations.
- If it is 3-4, there are $\binom 73\binom 44(3-1)!(4-1)!=420$.
- If it is 2-5, there are $\binom 72\binom 55(2-1)!(5-1)!=504$.
- If it is a 7-cycle, there are $(7-1)!=720$.
The sum is $1854$.
But I guess that this is difficult to do for arbitrary $n$.