
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
Let $S_n$ be the sum of the first $n$ terms of the sequence $\{a_n\}$, given that $S_3=7$ and $(a_1+3)$, $(a_3+4)$ have a common arithmetic mean with $3a_2$.

$(1)$ Find $a_2$;

$(2)$ If $\{a_n\}$ is a geometric sequence, find $a_n$.

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