Summation of Products of n Numbers taken m at a time with Repetitions/Examples/Order 2

Theorem

 * $\displaystyle \sum_{i \mathop = 0}^n \sum_{j \mathop = 0}^i a_i a_j = \dfrac 1 2 \left({\left({\sum_{i \mathop = 0}^n a_i}\right)^2 + \left({\sum_{i \mathop = 0}^n {a_i}^2}\right)}\right)$

Proof
Let:

Then:

Hence the result on multiplying by $\dfrac 1 2$.