
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 geometric sequence $\{a_n\}$ with a common ratio $q>1$, the sum of the first $n$ terms is $S_n$, $S_3=7$, and $a_1+2$, $2a_2$, $a_3+1$ form an arithmetic sequence. The sum of the first $n$ terms of the sequence $\{b_n\}$ is $T_n$, and $6T_n=(3n+1)b_n+2$, where $n\in\mathbb{N}^*$.  
(1) Find the general formulas for the sequences $\{a_n\}$ and $\{b_n\}$.  
(2) Let $A=\{a_1, a_2, \ldots, a_9\}$, $B=\{b_1, b_2, \ldots, b_{38}\}$, and $C=A\cup B$. Calculate the sum of all elements in set $C$.

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