Let an=∫−1n(1+2x+3x2+⋯+nxn−1)dx for every n∈N. Then the sum of all the elements of the set {n∈N:an∈(2,30)} is\_\_\_
Answer: 5
Solutions · 1
Official solution
\[a_n = \left[x+\frac{x^2}{2^2}+\frac{x^3}{3^2}+\cdots+\frac{x^n}{n^2}\right]_{-1}^n = \sum_{k=1}^n\frac{n^k-(-1)^k}{k^2}\]
Computing successive values: a1=2, a2=29, a3=9100, a4>31.
Since a1=2∈/(2,30) (endpoint excluded) but a2,a3∈(2,30) and a4∈/(2,30), the qualifying set is {2,3}, with sum =5.