Computation of binomial summation I am trying to compute the summation
$$
\sum^{n}_{i=0, \,i\text{ even}} i \binom{n}{i}
$$
but got stuck. Is there any possible hint?
 A: HINT: $i\binom{n}i=n\binom{n-1}{i-1}$. If that’s not enough, take a look at the spoiler block.

 $$\sum_{\substack{i=0\\i\text{ even}}}^ni\binom{n}i=n\sum_{\substack{i=0\\i\text{ even}}}^n\binom{n-1}{i-1}=n\sum_{\substack{1\le i\le n-1\\i\text{ odd}}}\binom{n-1}i$$

A: This is the number of ways to select a subset of even size and a point in it. This is equal to the number of ways to select a point, and then an odd subset that does not contain it.

There are $n2^{n-2}$ ways to do it.

C++ code to check some values:
#include <iostream>
using namespace std;

const int MAX = 20;
long long B[MAX][MAX];

long long pot(long long b, long long e){
        long long res = 1;
        while( e){
                if( e%2) res = res*b;
                b= b*b;
                e/=2;
        }
        return res;
}

long long func(int n){
        long long res = 0;
        for(int i=2;i<=n;i+=2){
                res += B[n][i]*i;
        }
        return res;
}

int main(){
        for(int i=0;i<MAX;i++){
                B[i][0] = 1;
        }
        for(int i=0;i<MAX;i++){
                for(int j=1;j<MAX;j++){
                        B[i][j] = B[i-1][j] + B[i-1][j-1];
                }
        }
        for(int i=2;i<MAX;i++){
                cout << func(i) << endl;
                cout << i*pot(2,i-2) << endl;
        }

}

A: Hint: Manipulate the sum of $i$ even into an expression in the sum of $i $odd.
Then use the following:
Let
$$S=0\binom{n}{0}+1\binom{n}{1}+2\binom{n}{2}+...+n\binom{n}{n}$$
$$S=0\binom{n}{n}+1\binom{n}{n-1}+2\binom{n}{n-2}+...+n\binom{n}{0}$$
$$S+S=n\left(\binom{n}{0}+...+\binom{n}{n}\right)$$
$$S+S=n\cdot 2^n$$
$$S=n\cdot 2^{n-1}$$
$$\boxed{\sum_{0\le i\le n}i\binom{n}{i}=n\cdot 2^{n-1}}$$
