MathDB
Number of good sequences

Source: China Second Round 2015 (B) Q4

May 5, 2016
combinatorics

Problem Statement

Given positive integers m,n(2mn)m,n(2\le m\le n), let a1,a2,,ama_1,a_2,\ldots ,a_m be a permutation of any mm pairwise distinct numbers taken from 1,2,,n1,2,\ldots ,n. If there exist k{1,2,,m}k\in\{1,2,\ldots ,m\} such that ak+ka_k+k is odd, or there exist positive integers k,l(1k<lm)k,l(1\le k<l\le m) such that ak>ala_k>a_l, then call a1,a2,,ama_1,a_2,\ldots ,a_m a good sequence. Find the number of good sequences.