
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 an geometric sequence $\{a_n\}$ with the sum of its first $n$ terms denoted as $S_n$, and $2^{n+1}$, $S_n$, $a$ form an arithmetic sequence $(n\in\mathbb{N}^*)$.

$(1)$ Find the value of $a$ and the general formula for the sequence $\{a_n\}$;

$(2)$ If $b_n=(2n+1)\log_{2}(a_na_{n+1})$, find the sum of the first $n$ terms $T_n$ for the sequence $\left\{ \frac{1}{b_n} \right\}$.

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