(1)
a(n+1)=(1+1/n)an+(n+1)/(2^n)
a(n+1)/(n+1) = (1/n)an + 1/(2^n)
a(n+1)/(n+1) - (1/n)an = 1/(2^n)
an/n - a(n-1)/(n-1) = 1/2^(n-1)
an/n - a1/1 = 1/2^(n-1) +1/2^(n-2)+..+ 1/2^1
= 1- 1/2^(n-1)
an/n = 2- 1/2^(n-1) = bn
(2)
an/n = 2- 1/2^(n-1)
an = 2n - n(1/2)^(n-1)
consider
1+x+x^2+...+x^n = (x^(n+1) -1) /(x-1)
1+2x+..+n.x^(n-1)
=[(x^(n+1) -1) /(x-1)]'
= { nx^(n+1) - (n+1)x^n + 1 } / (x-1)^2
put x= 1/2
1.(1/2)^0 + 2(1/2)^1+..+n(1/2)^(n-1)
= 4(n.(1/2)^(n+1) - (n+1)(1/2)^n + 1 )
an = 2n - n(1/2)^(n-1)
Sn = n(n+1) - 4(n.(1/2)^(n+1) - (n+1)(1/2)^n + 1 )