posted by wardjame
use the standard formular
a is the first term
d is the common difference
n is the number of terms
the sum = n/2(2a +(n-1)d)
calculate thr two sums starting with n one and ending in n two
bjh
I have an finite artihmetic series of 600, 700, 800, 900, 1000, 1100. I am trying to create an equation to calculate the sum of the last x terms of the series. I think my problem is the fact that the length of the series changes based on what element I am at. If I want to know what element 4 5 and 6 equal it is not the same as just calculating the sum of the series at element 6.
Thanks in advance for any help.
Finite arithmetic sequences have the nice property that the average of the entire sequece is the average of the first and last numbers.
This particular sequence, 600, 700, 800, ... has first member 600 and "constant difference" 100. The ith term can be written 600+ 100(i-1). If there are a total of n terms in the sequence then the "last x" would be n-(x-1)= n-x+1 to n. The n-x+1 term is 600+ 100(n-x+1-1)= 600+ 100(n-x) and the n term is 600+ 100(n-1). Their average is (600+ 100(n-x)+ 600+ 100(n-1))/2= (1100+ 200n-100x)/2= 550+ 100n- 50x and that is the average of the last x terms so the sum is .
For example, if n= 6 and x= 3, so we want the sum of the 4th, 5th, and 6th terms, we would have 550(3)+ 100(6)(3)- 50(9)= 1650+ 1800- 450= 3450- 450= 3000. In fact, the 4th, 5th, and 6th terms are 900, 1000, and 1100 which add to 900+ 1000+1100= 3000.
Thanks for all the help. I seem to have it working now. To put it in more simple terms I just shifted the end or start of the series accordingly. Because the start is always 600 and the end of the series is always 1100 I just used:
N((600+N(100))+1100)/2
where the start point is shifted up and:
N(600+1100-N(100))/2
where the end point is shifted down.
This seems to jive with your suggestions and the results look accurate. Thanks again.