1. Milton Keynes, UK
    Joined
    28 Jul '04
    Moves
    80196
    10 Nov '05 09:52
    What is the sum of all integers from 1 to 100 (or any integer to any other integer)?

    There is a much quicker way than going 1+2+3... etc.

    This would involve deriving a general equation so you can work it out for 1,000 or 1,000,000 without any trouble at all.
  2. Joined
    08 Oct '05
    Moves
    723
    10 Nov '05 10:00
    This is approximately grade 10 math.
    The simple solution is..
    (1+ 2+ 3 +4 +5+...+100)+
    (100+99 +98+.... +1)=
    101+101+.... +101= 100*101=10100
    But we counted each number twice so divide by 2.
    10100/2=5050

    Similiarly 1+2+...+n=n*(n+1)/2

    (m+1)+(m+2)+...+n= n*(n+1)/2 - m*(m+1)/2

    The story is that Guass (Arguably the greatest mathematician ever) was asked this by his teacher when he was about 7 (with a goal of keeping him and the rest of his class quite for the day). He wrote down the answer to the teachers annoyance and amazement.
  3. Milton Keynes, UK
    Joined
    28 Jul '04
    Moves
    80196
    10 Nov '05 10:45
    Originally posted by Virak
    This is approximately grade 10 math.
    The simple solution is..
    (1+ 2+ 3 +4 +5+...+100)+
    (100+99 +98+.... +1)=
    101+101+.... +101= 100*101=10100
    But we counted each number twice so divide by 2.
    10100/2=5050

    Similiarly 1+2+...+n=n*(n+1)/2

    (m+1)+(m+2)+...+n= n*(n+1)/2 - m*(m+1)/2

    The story is that Guass (Arguably the ...[text shortened]... his class quite for the day). He wrote down the answer to the teachers annoyance and amazement.
    Correct apart from the slight mistake in the second part. You added from (m+1) to n, should be m to n:

    m+(m+1)+(m+2)+...+n = (n*(n+1)/2) - (m*(m+1)/2) + m

    Which could be simplified to:

    http://www.lunacy.force9.co.uk/images/gauss.jpg
  4. Joined
    26 Apr '03
    Moves
    26771
    10 Nov '05 13:42
    The easiest way to remember the formula is:
    Average number times number of entries i.e. (m+n)/2 * (m - n + 1)
  5. Joined
    08 Oct '05
    Moves
    723
    10 Nov '05 18:24
    Added from M+1 on purpose.
    The idea being to add up to n and subtract the numbers from 1 to m
Back to Top

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.I Agree