Sn=1/2+3/4+5/8+...+(2n-1)/2^n
Sn/2=1/4+3/8+...+(2n-3)/2^n+(2n-1)/2^(n+1)
Sn-Sn/2=Sn/2=1/2+1/2+1/4+1/8+...+1/2^(n-1)-(2n-1)/2^(n+1)
=-1/2+1+1/2+1/4+...+1/2^(n-1)-(2n-1)/2^(n+1)
=-1/2+[1-(1/2)^n]/(1-1/2)-(2n-1)/2^(n+1)
=-1/2+2-4/2^(n+1)-(2n-1)/2^(n+1)
=3/2-(2n+3)/2^(n+1)
Sn=3-(2n+3)/2^n