I am practicing exclusion/ inclusion principle and trying to solve the following problem:
How many permutations of $1,2,3,...,n$ are there in which only the odd integers must be deranged (even integers may be in their own positions)?
My answer is:
$\sum_{j=0}^{n/2} (-1)^j\binom{n/2}{j}(n-j)!$ if $n$ is even
$\sum_{j=0}^{(n-1)/2+1} (-1)^j\binom{(n-1)/2+1}{j}(n-j)!$ if $n$ is odd
Am I right?