Formula for calculating consecutive integers?

This topic has expert replies
Newbie | Next Rank: 10 Posts
Posts: 6
Joined: Mon Mar 23, 2009 4:50 am
Formula for calculating consecutive integers?

I have come across several problems that in the explanation included a forumla for calculating consecutive integers. I can't remember if it was for consecutive even or consecutive odd or just consecutive in general.

Does anyone know this formula?
Back and better than before

Master | Next Rank: 500 Posts
Posts: 487
Joined: Fri Mar 27, 2009 5:49 am
Thanked: 36 times
510_At_It_Again wrote:Formula for calculating consecutive integers?

I have come across several problems that in the explanation included a forumla for calculating consecutive integers. I can't remember if it was for consecutive even or consecutive odd or just consecutive in general.

Does anyone know this formula?
Here is one trick, adopted from Carl F. Gauss, which you can adopt and tweak in your own way.

Add the consecutive integers 1 to 9.

1+9=10
2+8=10
3+7=10
4+6=10
And a 5

You can easily see that by adding the extremes and going toward the middle, you will get a constant number, in this case it is 10. Once you can determine how many such constant numbers there will be and whatever leftove number, if any, there is you are done.
The above sum is 45. What quick way could we arrive at 45?
9+1-1 = number of intergers involved. My thing is that whenver the sum ends in an odd number, I drop the last term and consider the rest and just add the last term.

So I would consider 8 numbers. Divide 8 by 2 and get 4. There are four groups that will sum to 9, ie I would consider the sum from 1 to 8 instead of from 1 to 9. This time, instead of 10 I will get 9. So 4 groups each having 9 as sum.
9 x4+9=45.

The consecutive sum from intergers a to c is accordingly
i) If Number of terms= c -a+1= odd, drop c and consider sum from a to b.
Then asnswer is (b-a+1)/2 x a+b + c

ii) if c-a +1 =even
then
(c-a +1 )/2 x a+c

Example Sum the consecutive integers from 200 to 2004

2004-200+1=1805 which is odd. So I would drop 2004 and sum to 2003

2003 -200+1= 1804. 1804/2=902

Sum = 902 x (200 +2003) +2004
(902 x 2203) +2004
1989110

Of course if the problem were sum 200 to 2003, we would have
902 x (200 +2003)
1987106

The extra step is the pain that comes from dealing with odd number of things.


For consecutive even numbers you know the their general terms and you can just use the formula for finding the Sum of an arithmetic sequence.

S= n/2 (2a +n-1)d

where d=2
a will be the first even or odd number
and n, the number of terms can be calculated as in the above example.

I wouldn't use this formula for consecutive numbers because I find the above method quicker but it can also be used, since d=1.