Math Gold Medalist

Lor

2023 AIME I 

Problem 10

There exists a unique positive integer $a$ for which the sum\[U=\sum_{n=1}^{2023}\left\lfloor\dfrac{n^{2}-na}{5}\right\rfloor\]is an integer strictly between $-1000$ and $1000$. For that unique $a$, find $a+U$.

(Note that $\lfloor x\rfloor$ denotes the greatest integer that is less than or equal to $x$.)

Casework

Modular Arithmetic

Important Identities

Fractional Part

Consider n = 1 to 5 and a mod 5

and generalize it for n = 1 to 2020

   Solution