
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 sequence $\{a_n\}$ whose sum of the first $n$ terms is $S_n$, and it satisfies $S_n=2a_n-n$, $(n\in\mathbb{N}^*)$

$(1)$ Find the general formula for the sequence $\{a_n\}$;  
$(2)$ If $b_n=(2n+1)a_n+2n+1$, and the sum of the first $n$ terms of the sequence $\{b_n\}$ is $T_n$, find the minimum value of $n$ that satisfies the inequality $\frac{T_n-2}{2n-1}\geqslant 128$.

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