an=2a(n-1)+2^n-1
an-1=2(a(n-1)-1)+2^n
令bn=an-1
bn=2b(n-1)+2^n
bn/2^n=b(n-1)/2^(n-1)+1
bn/2^n=b1/2+(n-1)
bn=((a1-1)/2+n-1)*2^n
an=((a1-1)/2+n-1)*2^n+1
a4=((a1-1)/2+3)*16+1
(a1-1)/2+3=5
a1=5
an=(n+1)*2^n+1
令cn=(n+1)*2^n
cn前n项和为tn,则sn=n+tn
tn=2*2+3*2^2+...+(n+1)*2^n
2tn=2*2^2+3*2^3+...+(n+1)*2^(n+1)
2tn-tn=(n+1)*2^(n+1)+n*2^n-(n+1)*2^n+...+2*2^2-3*2^2-2*2
tn=(n+1)*2^(n+1)-2^n-...-2^2-2-1-1
tn=(n+1)*2^(n+1)-(1+2+2^2+...+2^n)-1
tn=(n+1)*2^(n+1)-2^(n+1)
tn=n*2^(n+1)
sn=n+n*2^(n+1)