Question 59
Suppose sequence $\{a_n\}$ consists of nine terms, which satisfy $a_1 = a_9 = 1$ and $\frac{a_{i+1}}{a_i} \in \{2, 1, -\frac{1}{2}\}$ for any $i \in \{1, 2, \dots, 8\}$. Then the number of sequences like this is ______.
Math Olympiad Vault · MathNet 2013