Number of ways of shuffling cards such that $i^{th}$ card is not in the $i^{th}$ position

87 Views Asked by At

Suppose we have $n$ cards. How many ways of shuffling do we have such that card $i$ is not in the $i$ slot.

I thought about doing:

$n$ choices to pick card $1$, $(n-1)$ possible places to put it

$n-1$ choices to pick card $2$, $(n-2)$ possibilities

$2$ choices to pick Card $n$, $1$ possibility to put it in the deck