等差
1+2+.+n=(n+1)n/2=1/2n²+1/2n
等比
1/2+1/4+.+1/2^n={1/2(1-1/2^n)}÷(1-1/2)=1-1/2^n
sn=1/2n²+1/2n+1-1/2^n