
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 function $f(x) = ax^2 + bx$ ($a \neq 0$) has the derivative $f'(x) = -2x + 7$, and the sum of the first $n$ terms of the sequence $\{a_n\}$ is $S_n$. Points $P_n(n, S_n)$ ($n \in \mathbb{N}^*$) are all on the graph of the function $y = f(x)$. Find the general formula for the sequence $\{a_n\}$ and the maximum value of $S_n$.

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