Problem

Source: 2022 Bulgarian Spring Math Competition, Problem 10.3

Tags: combinatorics, Permutations with restrictions



A permutation $\sigma$ of the numbers $1,2,\ldots , 10$ is called $\textit{bad}$ if there exist integers $i, j, k$ which satisfy \[1 \leq i < j < k \leq 10 \quad \text{ and }\quad \sigma(j) < \sigma(k) < \sigma(i)\]and $\textit{good}$ otherwise. Find the number of $\textit{good}$ permutations.