MathDB
l < m but a_l > a_m or a_l - l is an odd number

Source: Indian Postal Coaching 2008 set 1 p4

May 25, 2020
combinatoricsoddinequalities

Problem Statement

Let nNn \in N and kk be such that 1kn1 \le k \le n. Find the number of ordered kk-tuples (a1,a2,...,ak)(a_1, a_2,...,a_k) of integers such the 1ajn1 \le a_j \le n, for 1jk1 \le j \le k and either there exist l,m{1,2,...,k}l,m \in \{1, 2,..., k\} such that l<ml < m but al>ama_l > a_m or there exists l{1,2,...,k}l \in \{1, 2,..., k\} such that alla_l - l is an odd number.