
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 an arithmetic sequence $\{a_n\}$ with distinct terms, given that $a_3a_5=3a_7$, and $S_3=9$.  
$(1)$ Find the general formula for the sequence $\{a_n\}$.  
$(2)$ Let $T_n$ be the sum of the first $n$ terms of the sequence $\left\{ \frac{1}{a_na_{n+1}} \right\}$, find the maximum value of $\frac{T_n}{a_{n+1}}$.

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