Problem

Source: 239 School Open MO, 2023, Senior league, Problem 3

Tags: number theory, residue, floor function



Let $n>1$ be a natural number and $x_k{}$ be the residue of $n^2$ modulo $\lfloor n^2/k\rfloor+1$ for all natural $k{}$. Compute the sum \[\bigg\lfloor\frac{x_2}{1}\bigg\rfloor+\bigg\lfloor\frac{x_3}{2}\bigg\rfloor+\cdots+\left\lfloor\frac{x_n}{n-1}\right\rfloor.\]