
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given a sequence $\left\{a_{n}\right\}$ with 9 terms, where $a_{1}=a_{9}=1$, and for each $i \in \{1,2, \cdots, 8\}$, $\frac{a_{i+1}}{a_{i}} \in \left\{2,1,-\frac{1}{2}\right\}$, determine the number of such sequences.

Present the answer in LaTex format: \boxed{Your answer}
user