Problem

Source:

Tags: symmetry, combinatorics, Combinatorics of words, counting, Digits, recurrence relation, IMO Shortlist



How many words with $n$ digits can be formed from the alphabet $\{0, 1, 2, 3, 4\}$, if neighboring digits must differ by exactly one? Proposed by Germany, FR.