MathCastle
ChallengeChallengeCounting: Inclusion–Exclusion & Stars and Bars

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

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