17

Possible Duplicate:
Proof for formula for sum of sequence $1+2+3+\ldots+n$?

Is there a shortcut method to working out the sum of n consecutive positive integers?

Firstly, starting at $1 ... 1 + 2 + 3 + 4 + 5 = 15.$

Secondly, starting at any other positive integer ...($10$ e.g.): $10 + 11 + 12 + 13 = 46$.

Carl
  • 405
  • 2
    The solution to the second problem follows from a solution of the first since $(m+1)+\cdots+n=S(n)-S(m)$ where $S(k)=1+\cdots+k$. About the first... the legend says that Gauss as a schoolboy realized quickly that if you sum as $(1+n)+(2+(n-1))+\ldots$ all the summands are the same, thus...... – Andrea Mori Jul 09 '11 at 09:45
  • 4
    Alternately, if there are $n$ successive integers, starting with $m+1$, the answer is $mn + (1 + 2 + \ldots + n)$. – Geoff Robinson Jul 09 '11 at 10:02
  • 3
    I'm pretty sure this is a duplicate. :) – Beni Bogosel Jul 09 '11 at 10:15
  • BTW: MarkUp is not allowed in subject title of posts. I've removed the asterisks. – Willie Wong Jul 09 '11 at 11:15
  • So I thought this was certainly a duplicate. But then I attempted to find such a duplicate, but to no avail. I'm at a loss as to how to effectively search for such a duplicate now. – davidlowryduda Jul 09 '11 at 15:49
  • @mixedmath, searching this website is more of an art than a science. Typing "consecutive" into the search box brought up question 15225, which covers some of the same territory but isn't exactly a duplicate. – Gerry Myerson Jul 10 '11 at 12:37
  • 2
    This is not at all a duplicate of the question its marked as a dupe of. This is asking for a simple formula, the other a detailed proof. Very different things. StackExchange has an epidemic of busy bodies marking things as duplicates unnecessarily and destructively. – B T Dec 18 '15 at 08:10

2 Answers2

41

Take the average of the first number and the last number, and multiply by the number of numbers.

Gerry Myerson
  • 179,216
  • 5
    ... and this works for any arithmetic progression – Henry Jul 09 '11 at 10:20
  • computation Sum = total_numbers * ( first / 2 + last / 2 ) – Miguel Mar 14 '17 at 10:53
  • @Miguel I believe your order of operations is wrong. It should be: Sum = total_numbers * (first + last) / 2 – Paul Hazen Feb 28 '21 at 02:48
  • 2
    @PaulHazen well depends on who is the user, computers do the first/2 and add last/2 in this order, calculators might use the "human" order, which would end up in a total different result. Either way, yes a/2 + b/2 is (a+b)/2 so your solution is more clear and its shorter and removed doubts. Thanks. – Miguel Mar 01 '21 at 22:14
30

The rule, as given by Gerry's answer (and the generalization as per Henry's comment) can be easily visualized, in a similar way as we deduce the area of a rectangular trapezium:

enter image description here

leonbloy
  • 63,430