tn = 2 + (n-1)[2n2-7n + 12]6
so Sn can be easily found out now
no need of even that..
the expression i have written above is true for n>2
so we can say that Sn=2Sn-1
Sn=2n-2S2 = 2n-1*5 (except if n=1)
Sn=Sn-1 + Sn-2 + Sn-3...............S1
therefor sum is 20480
example 20=10+5+3+2 ,10=5+3+2