
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 $n\in\mathbb{N}^{*}$, the terms of the sequence $\{a_n\}$ are positive, the sum of the first $n$ terms is $S_n$, and $a_1=1$, $a_2=2$. Let $b_n=a_{2n-1}+a_{2n}$.

$(1)$ If the sequence $\{b_n\}$ is a geometric sequence with a common ratio of $3$, find $S_{2n}$;

$(2)$ If for any $n\in\mathbb{N}^{*}$, $S_n= \frac{a_n^2+n}{2}$ always holds, find the general formula for the sequence $\{a_n\}$;

$(3)$ If $S_{2n}=3(2^n-1)$ and the sequence $\{a_na_{n+1}\}$ is also a geometric sequence, find the general formula for the sequence $\{a_n\}$.

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