
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 the sequence $\{a_n\}$ satisfy $a_1 + 3a_2 + 3^2a_3 + \cdots + 3^{n-1}a_n = \frac{n}{3} \left( n\in \mathbb{N}^* \right)$

$(1)$ Find the general formula for the sequence $\{a_n\}$;  
$(2)$ Let $b_n = \frac{n}{a_n}$, find the sum of the first $n$ terms of the sequence $\{b_n\}$, $S_n$.

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