Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Adding consecutive numbers

  • 19-03-2010 1:32pm
    #1
    Registered Users, Registered Users 2 Posts: 1,168 ✭✭✭


    What is the simplest way to add 1 plus 2 plus 3 plus 4 etc. all the way to 2000?

    Is there a formula that can be used or can it be done in excel?


Comments

  • Registered Users, Registered Users 2 Posts: 26,928 ✭✭✭✭rainbow kirby


    n(n+1) / 2 should give you the answer :)


  • Registered Users, Registered Users 2 Posts: 2,481 ✭✭✭Fremen


    1 + 2 + 3 + ... + 1999 + 2000 = x
    2000 + 1999 + ... + 3 + 2 + 1 = x

    Now add corresponding numbers in each sequence and you get 2000 copies of the number 2001, which you know is equal to 2x.

    Seems a bit homework-ish to me.


  • Registered Users, Registered Users 2 Posts: 1,163 ✭✭✭hivizman


    There's a famous story about the mathematician Carl Friedrich Gauss (1777-1855) that, when he was in primary school, his teacher wanted to keep the class busy for a period and told them to add together all the numbers from 1 to 100. Although the teacher expected this to take the boys a considerable amount of time, Gauss produced the answer within a couple of minutes, using the method that Fremen outlined. Although Wikipedia suggests that this story may be apocryphical, it's certainly consistent with Gauss's later career as a mathematician.


  • Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭Eliot Rosewater


    I was highly bored, so I decided to do a formal proof of this :pac:

    Proposition:

    [latex]\displaystyle \sum_{i=1}^n i=\frac{n(n+1)}{2}[/latex]

    Proof by induction.
    Case i=1

    [latex]\displaystyle \sum_{i=1}^1 i=\frac{1(1+1)}{2}[/latex]

    [latex]\displaystyle \sum_{i=1}^1 i=\frac{2}{2}[/latex]

    [latex]\displaystyle 1=1[/latex]


    Assume true for n=k, so that

    [latex]\displaystyle \sum_{i=1}^k i=\frac{k(k+1)}{2}[/latex]


    Now show that its true for n=k+1

    [latex]\displaystyle \sum_{i=1}^{k+1} i=\left(\sum_{i=1}^{k} i\right) + \left(k+1\right)[/latex]

    [latex]\displaystyle \sum_{i=1}^{k+1} i=\left(\frac{k(k+1)}{2}\right) + \left(k+1\right)[/latex]

    [latex]\displaystyle \sum_{i=1}^{k+1} i=\left(\frac{k(k+1)}{2}\right) + \left(\frac{2(k+1)}{2}\right)[/latex]

    Taking out a common factor, (k+1)

    [latex]\displaystyle \sum_{i=1}^{k+1} i= \frac{(k+1)(k+2)}{2}[/latex]

    [latex]\displaystyle \sum_{i=1}^{k+1} i= \frac{(k+1)((k+1)+1)}{2}[/latex]

    True, etc...


  • Closed Accounts Posts: 6,081 ✭✭✭LeixlipRed


    A much simpler and more aesthetic proof I believe is this one:

    [latex]S_{n} = 1+2+...+n-1+n[/latex]

    and also

    [latex]S_{n} = n+n-1+...+2+1[/latex]

    Add the two lines to get:

    [latex]2S_{n} = n(n+1)[/latex]
    [latex]S_{n}=\frac{ n(n+1)}{2}[/latex]


  • Advertisement
  • Closed Accounts Posts: 1,002 ✭✭✭f1dan


    What is the simplest way to add 1 plus 2 plus 3 plus 4 etc. all the way to 2000?

    Is there a formula that can be used or can it be done in excel?

    To do it quickly in excel, do this:

    Type 1 into cell A1
    Type 2 into cell A2
    Highlight cells A1 and A2
    Hover over the bottom right corner of cell A2 until the black cross appears
    Click, hold and drag down until you get to A2000
    In cell A2001, type in =SUM(A1:A2000) and you should get your answer


  • Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭Eliot Rosewater


    LeixlipRed wrote: »
    A much simpler and more aesthetic proof I believe is this one

    Its simpler for sure, but I myself don't like using "..." in proofs. I like my proofs to be mechanical leave no room for lack of intuition :pac:

    So a better proof than my induction one, and using your methodology, would be:

    [latex]\displaystyle 2S_{n}=\sum_{i=1}^n i+\sum_{i=1}^n i[/latex]

    Reversing the direction of the second sequence we get

    [latex]\displaystyle \sum_{i=1}^n i=\sum_{i=1}^n (n+1-i)[/latex]

    So that

    [latex]\displaystyle 2S_{n}=\sum_{i=1}^n i+\sum_{i=1}^n (n+1-i)[/latex]

    [latex]\displaystyle 2S_{n}=\sum_{i=1}^n (n+1)[/latex]

    Something summed n times, is that something times n. Dividing by two...

    [latex]\displaystyle S_{n}=\frac{n(n+1)}{2}[/latex]

    :)


  • Registered Users, Registered Users 2 Posts: 2,481 ✭✭✭Fremen


    Its simpler for sure, but I myself don't like using "..." in proofs. I like my proofs to be mechanical leave no room for lack of intuition :pac:

    Best get used to it. The further on you go, the sketchier they become :)


  • Registered Users, Registered Users 2 Posts: 39,900 ✭✭✭✭Mellor


    f1dan wrote: »
    To do it quickly in excel, do this:
    ....

    To do it quicker, do it in your head.


  • Registered Users, Registered Users 2 Posts: 5,141 ✭✭✭Yakuza


    hivizman wrote: »
    There's a famous story about the mathematician Carl Friedrich Gauss (1777-1855) that, when he was in primary school, his teacher wanted to keep the class busy for a period and told them to add together all the numbers from 1 to 100. Although the teacher expected this to take the boys a considerable amount of time, Gauss produced the answer within a couple of minutes, using the method that Fremen outlined. Although Wikipedia suggests that this story may be apocryphical, it's certainly consistent with Gauss's later career as a mathematician.

    He is also reputed to have said, (when his teacher wrote the numbers 1-10 on the board and asked "which of these numbers can be divided by 2"), "all of them" :)

    There are several handy formulas for summing the varous series (n, n², n³ etc) (your case was a simple case of an arithmetic series with the start value equal to 1 and the increment equal to 1). If you google "arithmetic series" you'll get more info.


  • Advertisement
Advertisement