Problem

Source: P2 Francophone Math Olympiad Senior 2022

Tags: combinatorics



To connect to the OFM site, Alice must choose a password. The latter must be consisting of $n$ characters among the following $27$ characters: $$A, B, C, . . ., Y , Z, \#$$We say that a password $m$ is redundant if we can color in red and blue a block of consecutive letters of $m$ in such a way that the word formed from the red letters is identical to the word formed from blue letters. For example, the password $H\#ZBZJBJZ$ is redundant, because it contains the ZBZJBJ block, where the word $ZBJ$ appears in both blue and red. At otherwise, the $ABCACB$ password is not redundant. Show that, for any integer $n \ge 1$, there exist at least $18^n$ passwords of length $n$, that is to say formed of $n$ characters each, which are not redundant.