Summing the Integers from 1 to n
Date: 08/31/2005 at 08:04:58 From: Anitha Subject: Adding up numbers How do you add numbers 1 - n using a formula? I know there exists a formula. Is it factorial or permutation, combination or arithmetic progression? For example, say I want to add up the numbers from 1-13. What is the formula so I don't have to literally count from 1-13 like 1+2+3+4....+13?
Date: 08/31/2005 at 08:55:52 From: Doctor Ian Subject: Re: Adding up numbers Hi Anitha, It's an arithmetic progression, so if you've learned a formula for the sum of an arithmetic sequence, you can use that. If you haven't, here's the basic idea. Add the sequence to itself, in reverse order, term by term: 1 + 2 + 3 + 4 + 5 5 + 4 + 3 + 2 + 1 - - - - - 6 6 6 6 6 <- sum of the first and last term \_______________/ number of terms So we can quickly find twice the sum: twice the sum = the number of terms * the sum of the first and last terms Which means we can divide that by two to get the sum itself. Does this make sense? - Doctor Ian, The Math Forum http://mathforum.org/dr.math/
Date: 09/01/2005 at 00:22:50 From: Anitha Subject: Thank you (Adding up numbers) Thank you sir for your answer! This method is really good! Thanks!
Date: 09/01/2005 at 01:38:37 From: Doctor Greenie Subject: Re: Adding up numbers Hello, Anitha -- I see Doctor Ian has already provided you with one method of finding a sum like this. His method is an excellent one; and it is one which is understandable to most young students. I have a slightly different way of thinking of the problem which (of course!) leads to the same result. My approach to the problem is a bit harder for most young students to understand; but it is very useful in similar but more complicated types of problems. Let's review Dr. Ian's method. With that method, we basically write the sum twice, the second time in reverse order, then add the two by adding the pairs of numbers in the two sequences. Every one of the sums is the sum of the first and last numbers (1 + n); and there are n of these pairs. So the sum of all these pairs is n(n + 1) But this sum counts every number in the sequence twice, so the actual sum of the numbers is half of this product: n(n + 1) sum of numbers 1 to n = -------- 2 In the form it is shown here, the formula makes sense--we can see that we multiplied n (the number of pairs) by n + 1 (the sum of each pair) and then divided by 2 to get our final answer. There are many other forms in which this formula can be displayed. We can multiply the two factors in the numerator to get n^2 + n ------- 2 In this form, we lose the visibility of what the formula means; so I don't care much for this form. Another way in which the formula is frequently displayed is n - * (n + 1) 2 This form also makes it hard to see where the formula comes from, so I don't care for it either. It is (in my opinion) unfortunate that this is the form which seems to be favored in many textbooks. Another form in which the formula can be displayed is (n + 1) n * ------- 2 This form I DO like; it demonstrates my approach to the problem of finding the sum of the numbers from 1 to n. In this form, the "n" is of course again the number of terms in the sequence. What is the "(n + 1)/2"? It is the sum of the last number, n, and the first number, 1, divided by 2. But when we add two numbers and divide by 2, we are finding the average of the two numbers. So the formula in this form says that the sum of the numbers in the sequence is the product of the number of terms and the average of the first and last. Well... we know that the sum of a group of numbers is the product of the average of all the numbers and the number of numbers. That means the formula in this form tells us that the sum of the first and last numbers in the sequence is the average of ALL the numbers in the sequence. And that tells us a very powerful fact about sequences like this. Because the numbers in the sequence are equally spaced, the average of all the terms is equal to the average of the first and last terms And since the sum of any group of numbers is the average of the numbers multiplied by how many numbers there are, we have, for any sequence like this in which the numbers are equally spaced, sum = (number of numbers) * (average of first and last) Now that we have waded through all the words of explanation, let's look at how we actually get the answer for your example using Doctor Ian's method and my method. We want to find the sum of 1+2+3+...+12+13 With Doctor Ian's method, we write the sequence a second time in reverse order, add the corresponding pairs (which all have the same sum); then we multiply by the number of terms to get the total; then we divide by 2 since we have added all the numbers in the sequence twice: 1+13 = 14 [sum of the two numbers in each pair...] 14*13 = 182 [multiplied by the number of pairs...] 182/2 = 91 [divided by 2, since we added each number twice] With my method, we find the average of all the numbers in the sequence by finding the average of the first and last numbers; then we multiply that average by the number of terms in the sequence: (1+13)/2 = 7 [average of all the numbers -- which is the average of the first and last...] 7*13 = 91 [multiplied by the number of terms] Of course we get the same answer; we just look at the problem a bit differently and use two slightly different computational paths to reach the answer. I hope you were able to stay with me through that lengthy explanation. Again, this method is a bit harder for most young students to understand; but if you do understand it, you may find it "works" better for you. - Doctor Greenie, The Math Forum http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.