What is the number of derangements of size $n$ such that for exactly one $i$, we have $|\sigma(i)-i|=1$

125 Views Asked by At

In combinatorial mathematics, a derangement is a permutation of the elements of a set, such that no element appears in its original position. In other words, derangement is a permutation that has no fixed points.The number of derangements of a set of size $n$, usually written $D_n$, is called the "derangement number" or "de Montmort number". (These numbers are generalized to rencontres numbers.) Then, $D_n=(n-1)(D_{n-1}+D_{n-2})$. Assume that $\sigma$ be a derangement of $n$ objects. For each $1\leq i \leq n$, set $x_i=|\sigma(i)-i|$. What is the number of derangements of size $n$ such that for exactly one $i$, we have $x_i=1$?