
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
The sum of the first $n$ terms of an increasing geometric sequence $\{a_n\}$ is $S_n$, and it is given that $a_5^2=a_{10}$, and $2a_n+5S_n=5S_{n+1}-2a_{n+2}$.  
(1) Find $a_n$;  
(2) Let $b_n=a_n|\cos \frac{n\pi}{2}|$, and the sum of the first $n$ terms of the sequence $\{b_n\}$ is $T_n$. If $T_n=340$, find the value of $n$.

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