1) Why we can write this constant summation like below? Some explanation and citation.
$$\sum_{k=j+1}^{n-1}c=\sum_{i=m}^{n}1={n-m+1}$$ Step 1) $$\sum_{k=j+1}^{n-1}c={(n-1)-(j+1)+1}={n-1-j-1+1}={n-j-1}$$
Step 2) $$c\sum_{i=0}^{n-1}\sum_{j=i+1}^{n-1}({n-j-1)}=c\sum_{i=0}^{n-1}\left[\sum_{j=i+1}^{n-1}n - \sum_{j=i+1}^{n-1}j-\sum_{j=i+1}^{n-1}1\right]$$
Step 3) For each summation in brackets we continue:
$$\sum_{j=i+1}^{n-1}n = n\sum_{j=i+1}^{n-1}=n((n-1) - (i+1)+1) = n(n-1-i)$$
$$\sum_{j=i+1}^{n-1}j = \sum_{i=1}^{n}i=\frac{n^{2}+n}{2}=\frac{(n-1)^{2}+n-1}{2} = \frac{n^{2}-n}{2}$$ At this point I don't understand why is there some other result for this one like:
$$\frac{(n-1-i)(n+1)}{2}$$
Some table of formulas and examples for problems to find big-Oh notation would be perfect.
Hint: The representation $\sum_{k=j+1}^{n-1}c=\sum_{i=m}^{n}1={n-m+1}$ is not admissible.
Here is a slightly different derivation which might ease calculations.
Comment:
In (1) we factor out the constant $c$.
In (2) we calculate the inner sum.
In (3) we shift the index of the inner sum to start with $j=0$.
In (4) we change the order of summation of the inner sum $j\rightarrow n-i-1-j$.
In (5) we calculate the inner sum by recalling Faulhaber's formulas.
In (6) we again change the order of summation of the inner sum $i \rightarrow n-i$. More detailed: \begin{align*} c\sum_{i=0}^{n}\frac{1}{2}(n-i-1)(n-i) &=\frac{c}{2}\sum_{i=0}^{n}(n-i-1)(n-i)\\ &=\frac{c}{2}\sum_{i=0}^{n}(n-(n-i)-1)(n-(n-i))\qquad\qquad\qquad [i\rightarrow n-i]\\ &=\frac{c}{2}\sum_{i=0}^{n}(i-1)i \end{align*}
In (7) we again use Faulhaber's formulas.