How many permutations of numbers $$(1,2,3, .., n)$$ are there in which at least $2$ elements are in their original place?
My idea for solving: $n! - |\text{no element stands in its original place}| - |\text{exactly one element is in its original place}|$
Is it correct?
We split the problem into subproblems.
How many exist with exactly one element in the same place?
Select one element to remain in the same place. For each selection, we find the derangement of the remaining (n-1) elements. . This tells us that there are $\frac{(n-1)!}{e}$ (rounded to the nearest integer so written $\left\lfloor \frac{(n-1)!}{e} +0.5 \right \rfloor$ ) ways to permutate n-1 elements so none are in the same place. This gives us $n \times \left\lfloor \frac{(n-1)!}{e} +0.5 \right \rfloor$ as we multiply by n for all the choices of fixed elements.
How many exist elements with none in the same place?
Similarly we get $\left\lfloor \frac{(n)!}{e} +0.5\right\rfloor$.
So the final answer is $n! - \left\lfloor \frac{(n)!}{e} +0.5\right\rfloor - n \times \left\lfloor \frac{(n-1)!}{e} +0.5\right\rfloor $