
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 $\{a_n\}$ where each term is a positive number, it satisfies $a_{n+1}^2-a_{n+1}a_n-2a_n^2=0$, and $a_3 + 2$ is the arithmetic mean of $a_2$ and $a_4$.

(1) Derive the general formula for the sequence $\{a_n\}$.

(2) If $b_n = a_n\log_{\frac{1}{2}}a_n$, calculate the sum of the first $n$ terms of the sequence $\{b_n\}$, denoted by $S_n$.

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