**Exercise 14.** Suppose $\left\{a_n\right\}_{n=1}^N$ and $\left\{b_n\right\}_{n=1}^N$ are two finite sequences of complex numbers. Let $B_k=\sum_{n=1}^k b_n$ denote the partial sums of the series $\sum b_n$ with the convention $B_0=0$. Prove the summation by parts formula
\[
\sum_{n=M}^N a_n b_n=a_N B_N-a_M B_{M-1}-\sum_{n=M}^{N-1}\left(a_{n+1}-a_n\right) B_n .
\]