
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
Let the sequence \( a(n) \) for \( n=1, 2, 3, \cdots \) be defined as follows:
\[ a(1) = 0 \]
and for \( n > 1 \),
\[ a(n) = a\left(\left\lfloor \frac{n}{2} \right\rfloor \right) + (-1)^{\frac{n(n+1)}{2}}. \]
(a) Find the maximum and minimum values of \( a(n) \) for \( n < 1996 \), and give all the values of \( n \) at which these extremum values are attained.

(b) How many terms \( a(n) \) are equal to 0 for \( n < 1996 \)?

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