[tex]S_n= \frac{n(a_1+a_n)}{2} \\ a_n=a_1+(n-1)d[/tex]
We have the first term as -1, and the common difference as 2 since:
[tex]a_2-a_1=a_3-a_2=a_4-a_3=...=a_n-a_{n-1}=d \\ 1-(-1)=3-1=5-3=2=d[/tex]
So:
[tex]S_{40}= \frac{40(-1+(40-1)2)}{2} =20*(-1+78)=20*77=1540[/tex]