Difference between revisions of "TADM2E 2.36"

From Algorithm Wiki
Jump to: navigation, search
(Undo revision 792 by EthanGamer (talk))
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<math>\sum\limits_{i=1}^{n/2} \sum\limits_{j=i}^{n-i} \sum\limits_{k=1}^{j} 1</math>
+
<math>\frac{n^2(7n-2)(n-1)}{48}</math>
 
 
The innermost summation is just j since the distance in the progression in 1.
 
 
 
<math>\sum\limits_{i=1}^{n/2} \sum\limits_{j=i}^{n-i} j</math>
 
 
 
For the middle summation we can use Gauss' rule.
 
 
 
<math>\sum\limits_{i=1}^{n/2} \frac{1}{2} * (n - i) * (n - i + i) = \sum\limits_{i=1}^{n/2} \frac{1}{2} * (n - i) * (n)</math>
 
 
 
We can rule out the constants.
 
 
 
<math>n*\frac{1}{2}*\sum\limits_{i=1}^{n/2} (n - i)</math>
 
 
 
We can now use the linearity of summations to get simpler ones.
 
 
 
<math>n*\frac{1}{2}*[\sum\limits_{i=1}^{n/2} n - \sum\limits_{i=1}^{n/2} i]</math>
 
 
 
In the first summation n is just a constant so we can bring it outside and the for the second summation we use, once again, Gauss' rule. The first summation turns into <math>\frac{n}{2}</math>.
 
 
 
<math>n^{2}*\frac{1}{2}*[\frac{n}{2} - (\frac{n}{2}*(\frac{n}{2} + 1))*\frac{1}{2}] = \frac{n^3}{16}</math>
 

Latest revision as of 13:37, 23 July 2020

$ \frac{n^2(7n-2)(n-1)}{48} $