
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 all terms are positive, let $A(n) = a_1 + a_2 + \ldots + a_n$, $B(n) = a_2 + a_3 + \ldots + a_{n+1}$, and $C(n) = a_3 + a_4 + \ldots + a_{n+2}$, where $n \in \mathbb{N}^*$.  
(1) If $a_1 = 1$, $a_2 = 5$, and for any $n \in \mathbb{N}^*$, the three numbers $A(n)$, $B(n)$, $C(n)$ form an arithmetic sequence in order, find the general formula for the sequence $\{a_n\}$.  
(2) If $a_1 = 1$, for any $n \in \mathbb{N}^*$, the three numbers $A(n)$, $B(n)$, $C(n)$ form a geometric sequence with common ratio $q$. Find the formula for the sum of the first $n$ terms of the sequence $\{a_n\}$, $A_n$.

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