2a(n+1) = a(n) + 1,
2a(n+1) - 2 = a(n) - 1,
a(n+1)-1 = [a(n)-1]/2,
{a(n)-1}是首项为a(1)-1=-1/2,公比为1/2的等比数列.
a(n)-1 = (-1/2)(1/2)^(n-1) = -1/2^n,
a(n) = 1 -1/2^n
s(n) = n - [1/2 + 1/2^2 + ...+ 1/2^n]
= n - (1/2)[1 + 1/2 + ...+ 1/2^(n-1)]
= n - (1/2)[1 - 1/2^n]/(1-1/2)
= n - 1 + 1/2^n