MathCastle
ChallengeChallengeCounting: Inclusion–Exclusion & Stars and Bars

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

How many permutations (p1,p2,…,p8)(p_1, p_2, \ldots, p_{8}) of (1,2,…,8)(1, 2, \ldots, 8) have no index ii with pi+1=pi+1p_{i+1} = p_i + 1? (That is, no number is immediately followed by the next larger number.)