taiwan-gsat 2023 Q17

taiwan-gsat · Other · gsat__math-b 5 marks Permutations & Arrangements Permutation Properties and Enumeration (Abstract)
Consider all sequences composed of only the three digits 0, 1, 2. The length $n$ of a sequence refers to the sequence consisting of $n$ digits (which may repeat). Let $a(n)$ be the total count of consecutive pairs of zeros (i.e., 00) appearing in all sequences of length $n$. For example, among sequences of length 3 containing consecutive zeros, there are 000, 001, 002, 100, 200. Among these, 000 contributes 2 occurrences of 00, and each of the others contributes 1 occurrence of 00, so $a(3) = 6$. The value of $a(5)$ is $\square$.
Consider all sequences composed of only the three digits 0, 1, 2. The length $n$ of a sequence refers to the sequence consisting of $n$ digits (which may repeat). Let $a(n)$ be the total count of consecutive pairs of zeros (i.e., 00) appearing in all sequences of length $n$. For example, among sequences of length 3 containing consecutive zeros, there are 000, 001, 002, 100, 200. Among these, 000 contributes 2 occurrences of 00, and each of the others contributes 1 occurrence of 00, so $a(3) = 6$. The value of $a(5)$ is $\square$.