Question on Solving a Double Summation $$ \sum_{i=0}^{n-2}\left(\sum_{j=i+1}^{n-1} i\right) $$
Formulas in my book give me equations to memorize and solve simple questions like $$ \sum_{i=0}^{n} i $$ ... However, For the question on top, how would I go about solving it by hand without a calculator? WolfRamAlpha seems to give the equation of 1/6[(n-2)(n-1)n].
Any suggestions would be appreciated. It's not a homework question, but I am studying for a test. I wrote the mathematical version of two nested for-loops for code that checks to see if a number in an array is unique or not.
Thank you.

Since the sum $$\sum_{j=i+1}^{n-1} i $$ does not depend on $j$ we see $$\sum_{j=i+1}^{n-1} i = i\cdot\sum_{j=i+1}^{n-1} 1= i(n-1-i) $$
Then you have to find $$\sum_{i=0}^{n-2} \left( i(n-1-i)\right)=\sum_{i=0}^{n-2} \left( (n-1)i-i^2)\right)=(n-1) \sum_{i=0}^{n-2} i- \sum_{i=0}^{n-2} i^2$$
Can you solve it from here?
Hope that helps,
Edit:  Perhaps you wanted a $j$.  In other words, lets evaluate $$ \sum_{i=0}^{n-2}\left(\sum_{j=i+1}^{n-1} j\right) $$
Reversing the order of summation yields:
$$ \sum_{j=1}^{n-1}\left(\sum_{i=j-1}^{n-2} j\right) $$ which can be solved by the exact same method presented above.
