Suppose #{f_n}# and #{g_n}# are two sequences. Then,
#sum_(n=0)^N f_n (g_(n+1)-g_(n)) = f_(N+1)g_(N+1)-f_0g_0-sum_(n=0)^(N)g_(n+1)(f_(n+1)-f_(n))#.
This can be proved by investigating
#sum_(n=0)^N f_n(g_(n+1)-g_(n))+g_(n+1)(f_(n+1)-f_(n))#.
Expanding gives,
#sum_(n=0)^N f_ng_(n+1)-f_ng_(n)+g_(n+1)f_(n+1)-g_(n+1)f_(n)#,
#sum_(n=0)^N f_(n+1)g_(n+1)-f_ng_n#.
This is now a telescoping where all the terms cancel apart from the first and the last, giving
#sum_(n=0)^N f_(n+1)g_(n+1)-f_(n)g_(n)=f_(N+1)g_(N+1)-f_(0)g_(0)#.
Substituting,
#sum_(n=0)^N f_n(g_(n+1)-g_(n))+g_(n+1)(f_(n+1)-f_(n)) = f_(N+1)g_(N+1)-f_(0)g_(0)#,
#sum_(n=0)^N f_n (g_(n+1)-g_(n)) = f_(N+1)g_(N+1)-f_0g_0-sum_(n=0)^(N)g_(n+1)(f_(n+1)-f_(n))# as required.
Then, let #f_(n)=n# and let #g_(n+1)-g_(n)=2^(-n)#. We see that if #g_(n)=k2^(-n)# then
#g_(n+1)-g_(n)=k(2^(-(n+1))-2^(-n))#,
#g_(n+1)-g_(n)=k(1/2*2^(-n)-2^(-n))#,
#g_(n+1)-g_(n)=-(k)/2 2^(-n)#.
Then let #k=-2# giving #g_(n+1)-g_(n)=2^(-n)# for #g_(n)=-2*2^(-n)#
We conclude #f_(n)=n#, #g(n)=-2*2^(-n)#.
Substituting,
#sum_(n=0)^N n/2^n = -2(N+1)2^(-(N+1))+2sum_(n=0)^(N)2^(-(n+1))(n+1-n)#,
#sum_(n=0)^N n/2^n = -2(N+1)2^(-(N+1))+sum_(n=0)^(N)2^(-n)#,
By the sum of a geometric series,
#sum_(n=0)^N n/2^n = -2(N+1)2^(-(N+1))+(1-2^(-(N+1)))/(1-1/2)#,
#sum_(n=0)^N n/2^n = 2-2*2^(-(N+1))((N+1)+1)#,
#sum_(n=0)^N n/2^n = 2 - (N+2)2^(-N)#
As #N -> +\infty# #(N+2)2^(-N) -> 0#.
Then
#sum_(n=0)^(\infty) n/2^n = 2#.