If I have the numbers $0,1,2,3,4,5,6,7,8,9$ written down in that order, how many ways can the $10$ digits be written down so that no even digit is in its original position?
It would seem that I can move rewrite it starting from $0$ in $9!$ ways, and same with $2,4,6,8$, hence the answer is $5*9!=1814400$ is this correct?
Let $r(m,n)$ be the number of ways of placing $m$ objects, with $n$ of them constrained not to go in a particular position, where the $n$ particular positions are all different. Then we have $r(m,0)=m!$ (obviously), $r(m,1)=(m-1)(m-1)!$ (because we may place the constrained object in $m-1$ ways, and then the remainder unconstrained), and $$r(m,n)=(n-1)r(m-1,n-2)+(m-n)r(m-1,n-1)$$ We may place a constrained object in a place blocked to another object ($n-1$ possibilities), then the remainder in $r(m-1,n-2)$ ways, or we can place it in one of the places where any object may go and the remainder can then be placed in $r(m-1,n-1)$ ways. Calculating, we get $r(10,5)=2170680$.