a 1+a2=5
a2=5-a 1
a2+a3=5
a3 = 5-a2 = 5-(5-a 1)= a 1
a3+a4=5
a4=5-a3=5-a 1=a2
...
a 18=a2=5-a 1=5-2=3
When n is an even number
Sn=a 1+a2+a3+...+ An
=n/2a 1+n/2a2
=n/2(a 1+a2)
=5n/2
When n is an odd number
Sn=a 1+a2+a3+...+ An
=(n+ 1)/2a 1+(n- 1)/2 a2
=(n+ 1)/2a 1+(n+ 1-2)/2(5-a 1)
=(n+ 1)/2a 1+(n+ 1)/2 * 5-(n+ 1)/2a 1-5+a 1
=5/2(n+ 1)-5+a 1
=5/2n-5/2+2
=5/2n- 1/2