Sn=(2-½)+(4-(½)^2)+.....+[2(n-1)-(½)^(n-1)]+[2n-(½)^n]
=2+4+...2(n-1)+2n-[½+(½)^2+...+(½)^(n-1)+(½)^n]
=2[1+2+...+(n-1)+n]-½(1-½)^n/(1-½)
=2*n(n+1)/2-(1-½)^n
=n^2+n-(1-½)^n
{2n-1/2^n}把两个项分开算。先算2n的和,再减去1/2^n的和。
Sn=(2-½)+(4-(½)^2)+.....+[2(n-1)-(½)^(n-1)]+[2n-(½)^n]
=2+4+...2(n-1)+2n-[½+(½)^2+...+(½)^(n-1)+(½)^n]
=2[1+2+...+(n-1)+n]-½(1-½)^n/(1-½)
=2*n(n+1)/2-(1-½)^n
=n^2+n-(1-½)^n
{2n-1/2^n}把两个项分开算。先算2n的和,再减去1/2^n的和。