A simple algebra question involving a sum of a series I'm sorry if the question is silly, but I wondered if the next equation is right:
$$\sum\limits_{k = 1}^n {2^{n-k}}k = \sum\limits_{k = 1}^n k \sum\limits_{k = 1}^n {2^k}$$
And if not, is there a way to represent it without the sum $\sum\limits_{k = 1}^n {2^{n-k}}k$ ?
 A: At first note that left-hand side and right-hand side of the equation are different.

The LHS is
  \begin{align*}
\sum_{k=1}^nk\sum_{k=1}^n2^k&=\left(\sum_{k=1}^nk\right)\left(\sum_{k=1}^n2^k\right)\\
&=(1+2+3+\cdots+n)(2^1+2^2+2^3+\cdots+2^n)
\end{align*}
  whereas the RHS is
  \begin{align*}
\sum_{k=1}^n 2^{n-k}k=1\cdot 2^{n-1}+2\cdot 2^{n-2}+3\cdot 2^{n-3}+\cdots+n\cdot 2^0
\end{align*}
  which are quite different, already when $n=1$.

We can derive a closed formula as follows:

\begin{align*}
\sum_{k=1}^nk2^{n-k}&=2^n\left(\sum_{k=1}^nk\frac{1}{2^k}\right)=2^n\left.\left(\sum_{k=1}^nkx^k\right)\right|_{x=\frac{1}{2}}\\
&=2^n\left.\left(x\sum_{k=1}^nkx^{k-1}\right)\right|_{x=\frac{1}{2}}\tag{1}\\
&=2^{n-1}\left.\left(\frac{d}{dx}\sum_{k=1}^nx^k\right)\right|_{x=\frac{1}{2}}\tag{2}\\
&=2^{n-1}\left.\frac{d}{dx}\left(\frac{x-x^{n+1}}{1-x}\right)\right|_{x=\frac{1}{2}}\tag{3}\\
&=2^{n-1}\left.\left(\frac{nx^{n+1}-(n+1)x^n+1}{(1-x)^2}\right)\right|_{x=\frac{1}{2}}\tag{4}\\
&=2^{n+1}-n-2\tag{5}
\end{align*}

Comment:


*

*In (1) we write the sum as series in $x$ evaluated at $x=\frac{1}{2}$ and factor out $x$ to prepare it for differentiation.

*In (2) we write the sum as derivative of a finite geometric series in $x$ and evaluated the single factor $x$ left from the sum already at $x=\frac{1}{2}$.

*In (3) we apply the formula for the finite geometric series.

*In (4) we differentiate the expression.

*In (5) we finally evaluate the expression at $x=\frac{1}{2}$ in order to get a closed formula.
Note: If this derivation is at the time too complicated, we could also claim the final result (5) and prove it using mathematical induction.
