MathCastle
ChallengeMediumCounting: Inclusion–Exclusion & Stars and Bars

Counting: Inclusion–Exclusion & Stars and Bars · Medium problem

How many permutations of (1,2,…,8)(1,2,\ldots,8) have no fixed point in the first three positions; that is, the ii-th entry differs from ii for each of i=1,2,3i=1,2,3 (the other positions are unrestricted)?