A1=-5, d=6
an=a1+(n-1)d
sn=n(a1+an)/2
n(a1+an)/2=1040
n(a1+an)=2080
an=-5+(n-1).6=-5+6n-6=6n-11
n(-5+6n-11)=2080
-5n+6n²-11n=2080
6n²-16n-2080=0
3n²-8n-1040=0
D=(-8)²+4.3.1040=64+12480=12544, √D=√12544=112
n1=(8+112)/6=120/6=20
n2=(8-112)/6=-104/6=-52/3 net rešenie,
Otvet: n=20