s(n) = [2+4+6+...+2n] + [1/4 + 1/8+ 1/16 + ... + 1/2^(n+1)]
= 2(1+2+3+...+n) + (1/4)[1+1/2 + 1/2^2 + ... + 1/2^(n-1)]
= n(n+1) + (1/4)[1 - 1/2^n]/(1-1/2)
= n(n+1) + [1-1/2^n]/2
= n(n+1) + 1/2 - 1/2^(n+1)
s(n) = [2+4+6+...+2n] + [1/4 + 1/8+ 1/16 + ... + 1/2^(n+1)]
= 2(1+2+3+...+n) + (1/4)[1+1/2 + 1/2^2 + ... + 1/2^(n-1)]
= n(n+1) + (1/4)[1 - 1/2^n]/(1-1/2)
= n(n+1) + [1-1/2^n]/2
= n(n+1) + 1/2 - 1/2^(n+1)