
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 sequence $\{a_n\}$ whose sum of the first $n$ terms is $S_n$, and $2S_n = (a_n - 1)(a_n + 2)$,

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

(2) Let the sum of the first $n$ terms of the sequence $\left\{ \frac{(n-1) \cdot 2^n}{na_n} \right\}$ be $T_n$, compare the magnitude of $T_n$ and $\frac{2^{n+1}(18-n)-2n-2}{n+1}$.

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