# Re: odd even numbers

[ Follow Ups ] [ Post Followup ] [ Main Message Board ] [ FAQ ]

Posted by Subhotosh Khan on September 18, 2002 at 12:32:31:

In Reply to: Re: odd even numbers posted by Conor on September 18, 2002 at 09:38:41:

: : We were trying to figure out what the sum of the first 1000 odd numbers and the first 1000 even numbers, but we kept getting different answers. If someone could help, we would appreciate it!

: We finally got the same answer for even numbers. Now we just need odds. Thanks!

: Conor

**************************************
It is a series of arithmatic progression:

S = a + (a+r) + (a+2r).....+ (a + (n-2)r) + (a + (n-1)r)

S = (a + (n-1)r) + (a + (n-2)r) + (a + (n-3)r) ... + (a + 2r) + (a + r) + a

by adding above two we get:

2S = (2a + (n-1)r) + (2a + (n-1)r) + (2a + (n-1)r)...+ (2a + (n-1)r)+ (2a + (n-1)r) + (2a + (n-1)r)

From this you can solve for 'S' to get a generalized solution for sum of 'n' terms of ANY series in arithmatic progression.

In your case a = 1 and r =2.

Name:
E-Mail:

Subject: