
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
If \( a \) is the first term and \( d \) is the common difference of an arithmetic sequence, we have the following system of equations:
\[
\begin{cases}
a + 16d = 52, \\
a + 29d = 13
\end{cases}
\]
Solving this yields \( d = -3 \) and \( a = 100 \).

The sum of the first \( n \) terms of an arithmetic sequence \( S_{n} \) reaches its maximum value when \( a_{n} > 0 \) and \( a_{n+1} \leq 0 \). Given \( a_{n} = a + d(n-1) \), from the inequality \( 100 - 3(n-1) > 0 \), we find \( n = \left\lfloor \frac{103}{3} \right\rfloor = 34 \).

Then, the maximum sum \( S_{n} \) is \( S_{34} = 0.5 \cdot (100 + 100 - 3 \cdot 33) \cdot 34 = 1717 \).

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