4. Suppose that $a_{1}, a_{2}, a_{3}, a_{4}, \cdots$ is an arithmetic progression with $a_{1}>0$ and $3 a_{8}=5 a_{13}$. Let $S_{n}=a_{1}+a_{2}+\cdots+a_{n}$ for all integers $n \geq 1$. Find the integer $n$ such that $S_{n}$ has the maximum value.
4. Answer: 20
Solution. Let $a_{n}=a_{1}+(n-1) d$. As
$$
3 a_{8}=5 a_{13}
$$
we have $3\left(a_{1}+7 d\right)=5\left(a_{1}+12 d\right)$, and so $2 a_{1}+39 d=0$. So $d0$ but $a_{21}a_{2}>\cdots>a_{20}>0>a_{21}>\cdots .
$$

Hence $S_{n}$ has the maximum value when $n=20$.