Saturday, December 19, 2020

Sum of Increasing Series

 Sum of Increasing Series


The Sum From 1 to N - Increasing by 1


It is well known that sum from 1 to N, which each term increasing by 1 is:


1 + 2 + 3 + 4 + ... + N = ∑ x from x = 1 to N = (N + 1) * N / 2


The derivation is fairly easy.  Let S be the sum:


S = 1 + 2 + 3 + ... + N-1 + N


Add S to both sides:


2 * S = 1 + 2 + 3 + ... + N-1 + N + 1 + 2 + 3 ... + N-1 + N


Thanks to the commutative property of addition, we can arrange terms, and with a clever and creative way of arranging terms:


2 * S = ( 1 + N ) + ( 2 + N - 1 ) + ( 3 + N - 2 ) + ... + ( N - 1 + 2 ) + ( N + 1 )


Note that:


2 * S = 

1   +    2   +   3   + ... +  N-1  + N +

N  +  N-1 + N-2  + ..  +   2   +  1


Written this way, there are N "pairs".  Hence:


2 * S = ( 1 + N ) + ( N + 1 ) + ( N +1 ) + ... + ( N + 1 ) + ( N + 1 )


2 * S = ( N + 1 ) * N


Solving for S:


S =  ( N + 1 ) * N / 2


The Sum From 1 to N - Increasing by 2


Now lets consider the sum:


1 + 3 + 5 + 7 + ...


Fun fact: Adding odd numbers in this fashion will always total perfect squares.


1 + 3 = 4 = 2^2

1 + 3 + 5 = 9 = 3^2

1 + 3 + 5 + 7  = 16 = 4^2

1 + 3 + 5 + 7 + 9  = 25 = 5^2

... and so on


Let's define S as the sum:


S = 1 + 3 + 5 + ... + N-4 + N-2 + N


Note that

1 = 2 * 0 + 1

3 = 2 * 1 + 1

5 = 2 * 2 + 1

and so on...


For integer q,

N = 2 * q + 1


Then:


S = 1 + 3 + 5 + ... + ( 2*(q-2) + 1 ) + ( 2*(q-1) + 1) + ( 2*q + 1 )


Using the same strategy as last time:


2 * S = 1 + 3 + 5 + ... + ( 2*(q-2) + 1 ) + ( 2*(q-1) + 1) + ( 2*q + 1 ) 

           + 1 + 3 + 5 + ... + ( 2*(q-2) + 1 ) + ( 2*(q-1) + 1) + ( 2*q + 1 )


2 * S =

     1         +          3            +         5            + ... + (2*(q-2) + 1) + (2*(q-1) + 1) +   (2*q + 1) +

(2*q + 1) + (2*(q-1) + 1)  + (2*(q-2) + 1) +  ... +             5        +            3        +     1


Combine each pair as such:


2  * S = (2*q + 2) + (2*q + 2) + (2*q + 2) + ... + (2*q + 2) + (2*q + 2) + (2*q + 2)


Since q starts at q = 0, there are q+1 "pairs".  


2 * S = (q + 1) * (2*q + 2)


S = (q + 1) * (2*q + 2) / 2


To show that the sum is a perfect square:


S = (q + 1) * (2*q + 2) / 2


= (2*q^2 + 2*q  + 2*q + 2) / 2


= (2*q^2 + 4*q + 2) / 2


= (q^2 + 2*q + 1)


= (q + 1)^2


Example:


Calculate 7^2 (albeit the "longer" way):


7 = q+1;  q = 6:


S = (6 + 1) * (2*6 + 2) / 2 = 7 * 14 / 2 = 7 * 7 = 49


The Sum From 1 to N - Increasing by 3


Now add the series:


S = 1 + 4 + 7 + 10 + ... + N - 3 + N


where each term increases by 3.  Letting q be a positive integer and noting that


1 = 3*0 + 1

4 = 3*1 + 1

7 = 3*2 + 1

10 = 3*3 + 1

and so on...


Then:


S = (3*0 + 1) + (3*1 + 1) + (3*2 + 1) + .... + (3(q-1) + 1) + (3q + 1)


2* S 

= (3*0 + 1) + (3*1 + 1) + (3*2 + 1) + ... + (3(q-1) + 1) + (3q + 1) 

+ (3*0 + 1) + (3*1 + 1) + (3*2 + 1) + ... + (3(q-1) + 1) + (3q + 1)


2 * S 

= (3*0 + 1) + (3*1 + 1)     + (3*2 + 1)     + ... + (3(q-1) + 1) + (3q + 1) 

+ (3*q + 1) + (3(q-1) + 1) +(3(q-2) + 1) + ...  +  (3*1 + 1)    + (3*0 + 1)


There are q+1 pairs.


2 * S 

= (3*q + 2)  + (3*q + 2) + (3*q + 2) + ... + (3*q + 2) + (3*q + 2)


2 *S = (q + 1) * (3*q + 2)


S = (q + 1) * (3*q + 2) / 2


Example:


q = 5  (terms from 0 to 5)


S = (5 + 1) * (3*5 + 2) / 2 = 6 * 17 / 2 = 51


1 + 4 + 7 + 10 + 13 + 16 = 51 


The Sum From A for q terms, increasing by D


Let A ≥ 0, D > 0 and q be a positive integer, and A is a starting term, let the sum S be:


S = A + (A + D) + (A + 2*D) + (A + 3*D) + ... + (A + (q-2)*D) + (A + (q-1)*D) + (A + q*D)


Since we start at q = 0, there are q+1 terms.


2*S =

A + (A + D) + (A + 2*D) + (A + 3*D) + ... + (A + (q-2)*D) + (A + (q-1)*D) + (A + q*D) +

A + (A + D) + (A + 2*D) + (A + 3*D) + ... + (A + (q-2)*D) + (A + (q-1)*D) + (A + q*D)


2*S = 

A + (A + D) + (A + 2*D) + ... + (A + (q-2)*D) + (A + (q-1)*D) + (A + q*D) +

(A + q*D) + (A + (q-1)*D) + (A + (q-2)*D) + ... + (A + 2*D) + (A + D) + A


2*S = (2*A + q*D) + (2*A + q*D) + (2*A + q*D) + ... + (2*A + q*D) + (2*A + q*D) + (2*A + q*D) 


2*S = (q + 1) * (2*A + q*D)


S = (q + 1) * (2*A + q*D) / 2


Example:


A = 10, D = 7; q = 4  (5 terms, increase by 7, initial term is 10)


(4 + 1) * (2*10 + 4*7) / 2 = 5 * (20 + 28) / 2 = 120


Note:  10 + 17 + 24 + 31 + 38  = 120


Source:


Knott, Dr. Ron "Proving that 1+2+3+...+n is n(n+1)/2"  February 12, 2003.  Accessed December 6, 2020.  http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/runsums/triNbProof.html


Eddie


All original content copyright, © 2011-2020.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


  Casio fx-7000G vs Casio fx-CG 50: A Comparison of Generating Statistical Graphs Today’s blog entry is a comparison of how a hist...