4. The number 2015 can be represented as the sum of consecutive integers in various ways, for example, $2015=1007+1008$ or $2015=$ $401+402+403+404+405$. In how many ways can this be done?
Answer: 16.

Solution: The sum of $k$ numbers starting from $n$ is $S(k, n)=\frac{1}{2}(2 n+k-1) \cdot k$. That is, we need to solve the equation $(2 n+k-1) \cdot k=4030$ in integers. Obviously, $k$ can be any divisor of $4030=2 \times 5 \times 13 \times 31$. Note that each of the prime factors $(2,5,13$ and 31$)$ can be in the power of 0 or 1 - in total 16 options.