Problem

Source:

Tags: SAU, miscellaneous



Find the number of permutations $ ( a_1, a_2, . \ . \ , a_{2016}) $ of the first $ 2016 $ positive integers satisfying the following two conditions: 1. $ a_{i+1} - a_i \leq 1$ for all $i = 1, 2, . \ . \ . , 2015$, and 2. There are exactly two indices $ i < j $ with $ 1 \leq i < j \leq 2016 $ such that $ a_i = i $ and $ a_j = j$.