∵S[n]=1/2+3/4+5/8+...+(2n-1)/2^n
∴S[n]/2=1/4+3/8+5/16+...+(2n-1)/2^(n+1)
∴S[n]-S[n]/2
=S[n]/2
=2/2+2/4+2/8+...+2/2^n-1/2-(2n-1)/2^(n+1)
=1/2^0+1/2^1+1/2^2+...+1/2^(n-1)-1/2-(2n-1)/2^(n+1)
=(1-1/2^n)/(1-1/2)-1/2-(2n-1)/2^(n+1)
=2-4/2^(n+1)-1/2-(2n-1)/2^(n+1)
=3/2-(2n+3)/2^(n+1)
∴S[n]=3-(2n+3)/2^n