\[- 13; - 11;\ - 9;\ldots \Longrightarrow d = 2;\ \ \]
\[S_{n} = \frac{2a_{1} + (n - 1)d}{2} \cdot n\]
\[S_{n} = \frac{2 \cdot ( - 13) + (n - 1) \cdot 2}{2} \cdot n =\]
\[= ( - 13 + n - 1) \cdot n =\]
\[= (n - 14)n = n^{2} - 14n\]
\[n^{2} - 14n = - 40\]
\[n^{2} - 14n + 40 = 0\]
\[n_{1} = 4;\ \ \ n_{2} = 10\]
\[Ответ:\ \ 4\ или\ 10.\]