Problem

Source: Dutch NMO 2022 p5

Tags: combinatorics



Kira has $3$ blocks with the letter $A$, $3$ blocks with the letter $B$, and $3$ blocks with the letter $C$. She puts these $9$ blocks in a sequence. She wants to have as many distinct distances between blocks with the same letter as possible. For example, in the sequence $ABCAABCBC$ the blocks with the letter A have distances $1, 3$, and $4$ between one another, the blocks with the letter $B$ have distances $2, 4$, and $6$ between one another, and the blocks with the letter $C$ have distances $2, 4$, and $6$ between one another. Altogether, we got distances of $1, 2, 3, 4$, and $6$; these are $5$ distinct distances. What is the maximum number of distinct distances that can occur?