<s>[INST] Closed form for summation involving binomial coefficients. how to work following formula 
$$f(n) = (n-1)C(n,n) +(n-2)C(n,n-1) + (n-3)C(n,n-2) + \ldots + (2-1)C(n,2)$$
out to following ?
$$f(n) = (n-2)2^{n-1} + 1$$
 [/INST] Another way, which is not really different but a bit more compact, uses $f(z)$ where
$$ f(z) = \sum_{k=2}^n (k-1) \binom{n}{k} z^{k-2}$$
so that we are interested in $f(1)$.
Formal power series integration yields
$$ \int f(z) \; dz = \sum_{k=2}^n \binom{n}{k} z^{k-1} =
\frac{1}{z} \left( (z+1)^n - nz - 1 \right)$$
Differentiating,
$$ f(z) = -\frac{1}{z^2} \left( (z+1)^n - nz - 1 \right) +
\frac{1}{z} \left( n (z+1)^{n-1} - n \right)$$
Now put $z=1$ to get
$$ f(1) = -(2^n -n - 1) + n 2^{n-1} - n =
(n-2) 2^{n-1} + 1.$$
</s>