retagged by
336 views

1 Answer

Best answer
11 votes
11 votes
$n(n-1)+(n-1)(n-2)+(n-2)(n-3)+...$

$n(n-1) +(n-1)((n-1)-1)+(n-2)((n-2)-1)+.....$

$=n^2-n + (n-1)^2- (n-1) + (n-2)^2 - (n-2)+...$

$=(n^2 +(n-1)^2 + (n-2)^2 +... ) -  (n +(n-1) + (n-2) +... )$

$=\frac{n(n+1)(2n+1)}{6} - \frac{n(n+1)}{2}$

$=\frac{n(n^2-1)}{3}$

Note:

$\sum ^n_{i=1} i= \frac{n(n+1)}{2}$

$\sum ^n_{i=1} i^2= \frac{n(n+1)(2n+1)}{6}$
selected by

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
0 answers
2
iarnav asked Mar 30, 2018
455 views
I came across a term solving a Recurrence Relation using recursion method and it was - 2log(n) = n.How's this being solved? Thanks.
1 votes
1 votes
1 answer
3
iarnav asked Jul 29, 2017
2,438 views
Given RR as -T(n) = 2T(n/2)+n ; n>1T(1) = 1Solve this using only BACK SUBSTITUTION method? Note - I am stuck at T(n)= 2^k.T(n/2^k)+(2^k-1).nand I'm putting 2^k=n Please h...