Comparison: SN = 1 / 2 + 2 / 4 + 3 / 8 + 4 / 16 +The power of N / 2 (n is a positive integer) and the size of 2

Comparison: SN = 1 / 2 + 2 / 4 + 3 / 8 + 4 / 16 +The power of N / 2 (n is a positive integer) and the size of 2

Sn=1/2+2/2^2+3/2^3+4/2^4…… +n/2^n
(1/2)*Sn= 1/2^2+2/2^3+3/2^4…… +(n-1)/2^n+n/2^(n+1)
The simultaneous two formulas are (1 / 2) * Sn = 1 / 2 + 1 / 2 ^ 2 + 1 / 2 ^ 3 + +1/2^n-n/2^(n+1)=1-1/2^n-n/2^(n+1)
Sn=2-1/2^(n-1)-n/2^n