A = {a1, a2, a3,...............a1010}
(a1+a2)+(a1+a3)+(a1+a4)+............+(a1+a1010) 1009 termeni
(a2+a3)+(a2+a4)+............+(a2+a1010) 1008
(a3+a4)+............+(a3+a1010) 1007
----------------------------------------------------------------- -------
(a1009+a1010) 1 termen
S are 1+2+3+4+..............+1009 = 1009·1010/2 = 509545 termeni