an+1=an+2^n+nan=a(n-1)+2^(n-1)+n-1...a2=a1+2+1a1=1累加起来得a(n+1)=2^n+2^(n-1)+...+1+n+(n-1)+...+1a(n+1)=2^(n+1)-1+n(n+1)/2所以an=2^n+n(n-1)/2-1
思路:左右叠加n项和即可。(自己算)