
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 $S_{n}=na_{1}+(n-1)a_{2}+\ldots+2a_{n-1}+a_{n}$.

(1) If $\{a_{n}\}$ is an arithmetic sequence, and $S_{1}=5$, $S_{2}=18$, find $a_{n}$;

(2) If $\{a_{n}\}$ is a geometric sequence, and $S_{1}=3$, $S_{2}=15$, find $S_{n}$.

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