Problem

Source: Russian TST 2022, Day 7 P3

Tags: number theory, congruence



Let $n = 2k + 1$ be an odd positive integer, and $m$ be an integer realtively prime to $n{}$. For each $j =1,2,\ldots,k$ we define $p_j$ as the unique integer from the interval $[-k, k]$ congruent to $m\cdot j$ modulo $n{}$. Prove that there are equally many pairs $(i,j)$ for which $1\leqslant i<j\leqslant k$ which satisfy $|p_i|>|p_j|$ as those which satisfy $p_ip_j<0$.