Question 140
Given a natural number $n$. We have $n + 1$ balls numbered $1$, $1$, $2$, $3$, ..., $n$ (only the first two are the same). We need to color these balls in $n$ given colors so that every ball is a single color and every color is used at least once. We denote by $a_n$ the number of possible colorings. Find the smallest $n$ for which $a_n$ is divisible by $2024$.
(Ivaylo Kortezov)
(Ivaylo Kortezov)