an=2^n+n+1
Sn=a1+a2+...+an
=(2^1+1+1)+(2^2+2+1)+...+(2^n+n+1)
=(2^1+2^2...+2^n)+(1+2+...+n)+(1+1+...+1)
=[2^(n+1)-2]+n(1+n)/2+n
=2^(n+1)+n²/2+3n/2-2
an=2^n+n+1
Sn=a1+a2+...+an
=(2^1+1+1)+(2^2+2+1)+...+(2^n+n+1)
=(2^1+2^2...+2^n)+(1+2+...+n)+(1+1+...+1)
=[2^(n+1)-2]+n(1+n)/2+n
=2^(n+1)+n²/2+3n/2-2