Problem

Source: 2021 EGMO P6

Tags: EGMO 2021, number theory, EGMO, asymptotics, algebra, equation, counting



Does there exist a nonnegative integer $a$ for which the equation \[\left\lfloor\frac{m}{1}\right\rfloor + \left\lfloor\frac{m}{2}\right\rfloor + \left\lfloor\frac{m}{3}\right\rfloor + \cdots + \left\lfloor\frac{m}{m}\right\rfloor = n^2 + a\]has more than one million different solutions $(m, n)$ where $m$ and $n$ are positive integers? The expression $\lfloor x\rfloor$ denotes the integer part (or floor) of the real number $x$. Thus $\lfloor\sqrt{2}\rfloor = 1, \lfloor\pi\rfloor =\lfloor 22/7 \rfloor = 3, \lfloor 42\rfloor = 42,$ and $\lfloor 0 \rfloor = 0$.