Problem

Source:

Tags: number theory, Subsets, romania, Romanian TST



For any non-empty subset $X$ of $M=\{1,2,3,...,2021\}$, let $a_X$ be the sum of the greatest and smallest elements of $X$. Determine the arithmetic mean of all the values of $a_X$, as $X$ covers all the non-empty subsets of $M$.