Data Structures and Algorithms with Object-Oriented Design Patterns in Python
next up previous index

About Arithmetic Series Summation

The series, tex2html_wrap_inline58119, is an arithmetic series  and the summation

displaymath58117

is called the arithmetic series summation .

The summation can be solved as follows: First, we make the simple variable substitution i=n-j:

  eqnarray919

Note that the term in the first summation in Equation gif is independent of j. Also, the second summation is identical to the left hand side. Rearranging Equation gif, and simplifying gives

eqnarray938

There is, of course, a simpler way to arrive this answer. Consider the series, tex2html_wrap_inline58125, and suppose n is even. The sum of the first and last element is n+1. So too is the sum of the second and second-last element, and the third and third-last element, etc., and there are n/2 such pairs. Therefore, tex2html_wrap_inline58133.

And if n is odd, then tex2html_wrap_inline58137, where n-1 is even. So we can use the previous result for tex2html_wrap_inline58141 to get tex2html_wrap_inline58143.


next up previous index

Bruno Copyright © 2003, 2004 by Bruno R. Preiss, P.Eng. All rights reserved.