
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
In an arithmetic sequence $\{a_n\}$, $S_n$ denotes the sum of the first $n$ terms. Given that $S_6=51$ and $a_5=13$,
(1) Determine the general term formula $a_n$ and the sum of the first $n$ terms $S_n$ of the sequence $\{a_n\}$;
(2) If the sequence $\{b_n\}$ is defined by $b_n= \frac{1}{a_n a_{n+1}}$, find the sum of the first $n$ terms $T_n$ of the sequence $\{b_n\}$;
(3) Let the function $f(n)$ be given by
\[ f(n)= \begin{cases} a_n, & \text{if $n$ is odd} \\ f\left(\frac{n}{2}\right), & \text{if $n$ is even} \end{cases} \]
and let $c_n = f(2^n+4)$ for $n \in \mathbb{N}^*$. Determine the sum of the first $n$ terms $M_n$ of the sequence $\{c_n\}$ (only the conclusion is required).

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