Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Coming up with a formula for

  1. Sep 12, 2004 #1
    Um, how can I figure out a formula for solving something like:

    1 + 3 + 5 + 7 + 9 + ... + n

    In particular: 1 + 3 + 5 + ... + 999

  2. jcsd
  3. Sep 12, 2004 #2
    As far as I know, there is no rote procedure for doing this. It's pretty much a trial and error process. Make yourself a table and figure out the pattern. In this case, we can write this as the sum from x = 0 to x = (n-1)/2 of 2x+1:

    x = 0 ===> Sum = 1
    x = 1 ===> Sum = 4
    x = 2 ===> Sum = 9
    x = 3 ===> Sum = 16

    We can keep this up if we need to to help us see the pattern, but in this case, a little thought shows that the formula is: Sum from x= 0 to x = n = (n+1)^2
  4. Sep 12, 2004 #3


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I believe that Gauss did this as school child when given the assignment to sum the digits 1-100.

    First note that if you add them together smallest to largest you get a constant result ( 100+ 1=101, 99+2=101 ..) multiply this by 100 because there are 100 sums and divide by 2 because you added all the numbers twice.

    OPPS! just noticed that you were not summing ALL integers.
    Last edited: Sep 12, 2004
  5. Sep 12, 2004 #4


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    After a bit more playing,

    consider this

    [tex]S = \Sigma _ {i=1}^N (2i -1) [/tex]

    now using the properties of the summation

    [tex] S= 2\Sigma_{i=1}^N i - \Sigma_{i=1}^N 1 [/tex]

    [tex]S= 2\Sigma_{i=1}^N i -N [/tex]

    Now using Gauss's trick we can see that the sum of n integers is given by

    [tex]S_n = \frac {(n+1)(n)} 2[/tex]

    So we can write for the sum of the odd integers

    [tex]S = (N+1)(N)-N = N^2[/tex]

    Note that I have given the general expression for the odd integers as 2n-1 and my sum starts with n=1 where geometer used 2n+1 and started with n=0. This is the reason he has N+1 where I have N. Also note that this N is NOT the odd integer you are summing to but the NUMBER OF TERMS in the sum.
    Last edited: Sep 12, 2004
  6. Sep 12, 2004 #5


    User Avatar
    Science Advisor
    Homework Helper

    Integral, the same idea of pairing highest and lowest will work just fine,
    1+3+5+7+9+11=12+12+12=(6/2)*12, where 6 is the number of terms here.

    If you already have a formula for the sum of the first n integers, 1+2+3+..+n, you can use this as well:
    1+3+5+7+9+11=(1+2+..+11)-(2+4+6+8+10)=(1+2+..+11)-2(1+2+3+4+5)=(insert formula here)-2(insert formula here)

    Caldus, do you have a formula for the sum of the first n integers? If not, see Integrals post;)

    Another idea, (which Integral provided while I was typing) write your sum as: [tex]\displaystyle\sum\limits_{i=1}^{n}(2i-1)[/tex] and fiddle with it to get an expression involving [tex]\displaystyle\sum\limits_{i=1}^{n}i[/tex], and apply the formula for this (again, using the ideas in Integral's post if need be). This would be a more easily applied general idea that can handle any arithmetic series [tex]\displaystyle\sum\limits_{i=0}^{n}(ki+d)[/tex].
    Last edited: Sep 12, 2004
  7. Sep 13, 2004 #6


    User Avatar
    Staff Emeritus
    Science Advisor

    Since you are adding only odd numbers, one way to do is this (Assuming you know that the sum of the first n integers is n(n+1)/2):
    The sum of all numbers from 1 to 2n is (2n)(2n+1)/2= n(2n+1). Now subtract off the sum of all even numbers from 2 to 2n: 2+ 4+ 6+ ...+ 2n= 2(1+ 2+ 3+ ... + n)=
    2(n)(n+1)/2= n(n+1).

    The sum of all odd numbers from 1 to 2n-1 is n(2n+1)- n(n+1)= n(2n+1- n- 1)= n2 just as shmoe said.

    In particular, the sum of all odd numbers from 1 to 99 is: (99= 100- 1= 2(50)- 1)
    502= 2500.
  8. Sep 13, 2004 #7


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Also, here's a general rule that can be used in times of trouble :

    If a series S, has terms t(n), which are polynomials in n, of order p, the sum S(n) is a polynomial of order p+1. The coefficients of this polynomial can be determined simultaneously, from the given p+2 terms in the series.

    Example : If the series S, has terms, t(n) which are linear in n, ie : t(n) = an + b, then the sum, S(n) is a quadratic in n, ie: S(n) = An^2 + Bn + C

    NOTE : The order of the polynomial can be determined by the method of "successive differences". If the p'th successive differences are equal, the order is p.

    Example : Consider the sequence : 2, 6, 12, 20, 30, ...
    The first differences are : 4, 6, 8, 10, ...
    The second differences are : 2, 2, 2, ...

    Since the second differences are equal, t(n) is a quadratic in n, ie : t(n) = an^2 + bn + c.

    So you can assume the sum has a cubic form : S(n) = An^3 + Bn^2 + Cn + D
    Plugging in the for S(1), S(2), S(3) and S(4) gives you 4 simultaneous equations in A, B, C, and D, which you can solve.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?