an=(n+1)n/2=(n^2+n)/2
Sn=(1^2+...+n^2+1+2+...+n)/2
1^2+2^2+..+n^2=n(n+1)(2n+1)/6
Sn=(n(n+1)(2n+1)/6+(n^2+n)/2)/2
=n(n+1)(2n+1)/12+(n^2+n)/4
an=(n+1)n/2=(n^2+n)/2
Sn=(1^2+...+n^2+1+2+...+n)/2
1^2+2^2+..+n^2=n(n+1)(2n+1)/6
Sn=(n(n+1)(2n+1)/6+(n^2+n)/2)/2
=n(n+1)(2n+1)/12+(n^2+n)/4