MathCastle
ChallengeChallengeCounting: Inclusion–Exclusion & Stars and Bars

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

How many permutations (p1,p2,…,p9)(p_1, p_2, \ldots, p_{9}) of (1,2,…,9)(1, 2, \ldots, 9) 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.)