Problem

Source: JBMO Shortlist 2023, C5

Tags: Sequence, JBMO, JBMO Shortlist, combinatorics



Consider an increasing sequence of real numbers $a_1<a_2<\ldots<a_{2023}$ such that all pairwise sums of the elements in the sequence are different. For such a sequence, denote by $M$ the number of pairs $(a_i,a_j)$ such that $a_i<a_j$ and $a_i+a_j<a_2+a_{2022}$. Find the minimal and the maximal possible value of $M$.