Fixed points in random permutations and the relationship between formulas We look at random permutations and their fixed points.
Suppose we have $f_k^{(n)}$ $0\le k\le n$ which describes the number of permutations of $1,\ldots, n$ with exactly $k$ fixed points.
In addition we have $f_0^{(n-k)}$ which obviously describes the amount of permutations without any fixed points.
Now I have to determine a relationship between $f_k^{(n)}$ and $f_0^{(n-k)}$.
There are formulas in the book of my professor which are the following
$$n!\left(\frac{1}{2!}-\cdots\mp\frac{1}{n!}\right)$$
$$\binom{n}{k}(n-k)!\left(\frac{1}{2!}-\cdots \mp \frac{1}{(n-k)!}\right)$$
The first one is for $f_k^{(n)}$ and the second one for $f_0^{(n-k)}$.
Everything is exactly the same but we have $(n-k)!$ in the second formula. Can someone explain me the formulas and their relationship?
 A: Hopefully this is a start... I'm still a little bit confused about your notation.
The number of derangements of an $n$ element set is 
$$n!\sum_{i=0}^{n}\frac{(-1)^i}{i!}.$$ 
Using your notation, this number is $f^{(n)}_0$.
Does your first equation actually give $f^{(n)}_0$? 
The formula I have given above looks almost the same.  Actually, they give the same results except when n=0 (in that case, yours fails. It returns 0, when there is actually one derangement of the empty set). 
To construct a permutation of n with k fixed points, you first choose the k points that you wish to fix, and then you pick a derangement of the remaining n-k non fixed points. There are 
$${n \choose k}(n-k)!\sum_{i=0}^{n-k}\frac{(-1)^i}{i!}$$
ways to do this. This is $f_k^{(n)}$ and looks similar to your second equation. If it is, indeed, what your second equation counts, note that we once again have different results when dealing with $0$. Namely, when $n=k$, your second equation gives ${n \choose k}(n-k)!(\textrm{ empty sum })=1*0!*0=0$, when there is actually one permutation with n fixed points: it sends every element to itself.
Is this what you are looking for? 
Also see
https://en.wikipedia.org/wiki/Derangement
https://en.wikipedia.org/wiki/Rencontres_numbers
if interested.
