Artificial intelligent assistant

Product of sum expression I am having a little trouble following an example I came across today which says that: $$2 \sum_{k=1}^{n} \sum_{i=0}^{k-2} 1 = 2 \sum_{k=1}^{n} (k-1) = 2 \sum_{j=0}^{n-1} j$$ I have tried fidgeting around with the expressions, but I just don't follow the thought process here. If anyone can please help me with some intermediate steps here, I will be very grateful!

Let's start by the interior summation, which is $$ \sum_{i=0}^{k-2} 1=\underbrace{1+1+\cdots +1}_{k-1\, \text{times}}, $$ k-1 times because there are the term when $i=0, i=1,\ldots , i=k-1$. So know you have $$ 2\sum_{k=1}^{n}(k-1) $$

Take $j=k-1$. When $k=1,j=0$ and when $k=n,j=n-1$, yielding $$ 2\sum_{j=0}^{n-1}j $$

Note that the $j=0$ term is useless, so you could always take it out, and you can explicitly calculate this sum with this formula: $$ \sum_{j=1}^n j= \frac{n(n+1)}{2}. $$ In your case, one gets $$ 2\sum_{j=0}^{n-1}j=\frac{2(n-1)n}{2}=n(n-1) $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 750927d91986d39518f1d4cb9e74485d