There are 2023 cups numbered from 1 through 2023. Red, green, and blue balls are placed in the cups according to the following rules.
- If cups $m$ and $n$ both contain a red ball, then $m-n$ is a multiple of 2 .
- If cups $m$ and $n$ both contain a green ball, then $m-n$ is a multiple of 3 .
- If cups $m$ and $n$ both contain a blue ball, then $m-n$ is a multiple of 5 .

What is the smallest possible number of empty cups?
We may assume that there exists at least one ball of each other colour since otherwise there will be more empty cups.

The conditions imply that there exist integers $a, b$, and $c$ such that:
- $\operatorname{Cup} n$ contains a red ball if and only if $n \equiv a(\bmod 2)$.
- Cup $n$ contains a green ball if and only if $n \equiv b(\bmod 3)$.
- $\operatorname{Cup} n$ contains a blue ball if and only if $n \equiv c(\bmod 5)$.

By the Chinese remainder theorem, we conclude that there must exist an integer $x$ such that Cup $n$ is empty if and only if $\operatorname{gcd}(n-x, 30)=1$.
Since the number of positive integers below 30 that are coprime with 30 is $\varphi(30)=8$, there must be exactly 8 cups in any sequence of 30 cups that satisfy this condition.
Note that $2023=67 \times 30+13$. The 8 residue classes coprime to 30 are
$$
1,7,11,13,17,19,23,29 \text {. }
$$

There is a sequence of 13 consecutive residue classes (starting at 24 and finishing at 6) that contains exactly two members of this set. It can be easily checked that there is no sequence of 13 consecutive residue classes containing fewer than two members of this set.

Therefore the smallest possible number of empty cups amongst 13 consecutive cups is 2 , and hence the smallest possible number of empty cups is
$$
67 \times 8+2=538 \text {. }
$$