
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 the sequences $\{a_n\}$, $\{b_n\}$ and the function $f(x)$, where $\{a_n\}$ is an arithmetic sequence with the first term $a_1=15$ and common difference $d\neq 0$, and $\{b_n\}$ satisfies $b_n=f(a_n)$.  
$(1)$ If $a_4$, $a_7$, and $a_8$ form a geometric sequence, find the value of $d$;  
$(2)$ If $d=2$ and $f(x)=|x-21|$, find the sum of the first $n$ terms of $\{b_n\}$, denoted as $S_n$;  
$(3)$ If $d=-1$ and $f(x)=e^x$, with $T_n=b_1\cdot b_2\cdot b_3\ldots b_n$, for what value of $n$ is $T_n$ maximized?

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