The base case is when n=1: 2-3/2=1/2 according to the formula, and this is true because 1/2 is the first term.
Assume for S[n] that the formula is true. We know the nth term is n/(2^n) so we would expect:
S[n+1] to be S[n]+(n+1)/(2^(n+1)).
So, 2-(n+2)/(2^n)+(n+1)/(2^(n+1))=
2-2(n+2)/(2^(n+1))+(n+1)/(2^(n+1))=
2+(n+1-2n-4)/(2^(n+1))=
2+(-n-3)/(2^(n+1))=
2-((n+1)+2)/(2^(n+1))=S[n+1].
This proves by induction that the formula is correct.