an=n2+2n∴Sn=∑nk=1(k2+2k)=∑nk=1k2+∑nk=12k........(1)
Consider ∑nk=12k=21+22+23+...
The above series 2,22,23,... is a G.P. with both
the first term and common ratio equal
to 2.
∴n∑k=12k=(2)[(2)n−1]2−1=2(2n−1)(2)
Therefore, from (1) and (2), we obtain
Sn=n∑k=1k2+2(2n−1)=n(n+1)(2n+1)6+2(2n−1)