[Math] how many permutations of {1,2,…,9}

combinatoricsdiscrete mathematicspermutations

How many permutations of {1,2,…,9} are there such that 1 does not immediately precede 2, 2 does not immediately precede 3, and so forth up to 8 not immediately preceding 9? One obvious example of such a permutation might be 987654321, but there are many others, such as 132465879 or 351724698.

Best Answer

For $\{1,2,3,\dots,n\}$, the numbers are tabulated here, along with lots of information, formulas, references, links, and whatnot. For $n=9$, it says 148329.

Related Question