
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), 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}} \).

(1) Determine the maximum and minimum values of \( a(n) \) for \( n < 1996 \), and provide all values of \( n \) for which these extreme values are achieved.

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

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