4.005. Find the number of terms of an arithmetic progression, the sum of all terms of which is 112, the product of the second term by the common difference is 30, and the sum of the third and fifth terms is 32. Write the first three terms of this progression.
Solution.

$$
\begin{aligned}
& \text { From the condition we have }\left\{\begin{array}{l}
\left(a_{1}+d\right) d=30, \\
\left(a_{1}+2 d\right)+\left(a_{1}+4 d\right)=32
\end{array} S_{n}=112 \Rightarrow\right. \\
& \Rightarrow a_{1}=16-3 d, \quad(16-2 d) d=30, \quad 2 d^{2}-16 d+30=0
\end{aligned}
$$

or

$$
\begin{aligned}
& d^{2}-8 d+15=0 \Rightarrow \\
& \Rightarrow\left\{\begin{array} { l } 
{ d ^ { \prime } = 3 , } \\
{ a _ { 1 } ^ { \prime } = 7 }
\end{array} \text { or } \left\{\begin{array}{l}
d^{\prime \prime}=5 \\
a_{1}^{\prime \prime}=1
\end{array}\right.\right.
\end{aligned}
$$

For each solution, we will use formula (4.5).

1) For $a_{1}^{\prime}=7, d^{\prime}=3$ we get

$$
112=\frac{14+3(n-1)}{2} n, \quad 3 n^{2}+11 n-224=0
$$

from which $n_{1}=7, n_{2}=-\frac{32}{3}$ (not suitable). In this case we have

$a_{1}^{\prime}=7, a_{2}^{\prime}=10, a_{3}^{\prime}=13$.

2) For $a_{1}^{\prime \prime}=1, d^{\prime \prime}=5$ we have $112=\frac{2+5(n-1)}{2} n, \quad 5 n^{2}-3 n-224=0$, from which $n=7, n=-6.4$ (not suitable). In this case the three terms are: $a_{1}^{\prime \prime}=1, a_{2}^{\prime \prime}=6, a_{3}^{\prime \prime}=11$.

Answer: 7; 1) $7,10,13 ; 2) 1,6,11$.