Sn=a1+a2+a3+……+an
=1(1+3)+2(2+3)+3(3+3)+……+n(n+3)
=1^2+2^2+3^2+……n^2+3(1+2+3+……+n)
=n(n+1)(2n+1)/6+3n(n+1)/2