
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 positive integer \( n \), let \( f(n) \) denote the number of \( n \)-digit numbers \(\overline{a_{1} a_{2} \cdots a_{n}}\) (referred to as waveform numbers) satisfying the following conditions:
(i) Each digit \( a_{i} \in \{1,2,3,4\} \), and \( a_{i} \neq a_{i+1} \) for \( i = 1, 2, \ldots, n-1 \);
(ii) For \( n \geq 3 \), the sign of \( a_{i} - a_{i+1} \) is opposite to the sign of \( a_{i+1} - a_{i+2} \) for \( i = 1, 2, \ldots, n-2 \).

(1) Find the value of \( f(10) \);
(2) Determine the remainder of \( f(2008) \) when divided by 13.

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