
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 ${a_1}=3,{a_2}=2,{a_{n+2}}=\left\{{\begin{array}{l}{{a_n}-1,n\text{ is odd}}\\{3{a_n},n\text{ is even}}\end{array}}\right.$.<br/>$(1)$ Find the general formula for the sequence $\{a_{n}\}$;<br/>$(2)$ Find the sum $S_{2n}$ of the first $2n$ terms of the sequence $\{a_{n}\}$.

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