The Sum of the First n Positive Integers

According to an anecdote, the math genius Carl Friedrich Gauss, added all the numbers from 1 through 100 when he was at a very young age. The sum of the first positive 100 integers is 5050 and Gauss was able to give this sum in less than a minute. True or not, how can we get the sum of all these numbers with admirable speed? Well, it’s not really that hard.

sum-of-first-n-positive-integers

If you want to be a great mathematician someday like Gauss, you must learn to explore problems and look for patterns. Notice that if you add the first 100 integers, the sum of the largest and the smallest integer is 101. Also, the sum of the second largest and the second smallest is 101. This also goes with the third largest and the third smallest and so on. Since there are the first 100 numbers can be divided into \frac{100}{2}=50 pairs, each of which has a sum of 101, the sum of all the numbers is 50(101) = 5050. We will use this strategy to generalize. We explore the sum of the first positive n integers.

In adding the first n integers, we have two cases. The first case, if the largest integer is even, like 100, and the second case is if the largest is odd.

Case 1: Largest integer is even.

If the largest integer is even, we can pair the numbers as shown below.  We can pair 1 and n, 2 and n - 1, 3 and n - 2, and so on.

sum-of-first-n-integers

Notice that each sum is equal to n + 1 and there are \frac{n}{2} pairs. Therefore , the sum of all the positive integers from 1 to n is

\displaystyle\frac{n}{2}(n+1) = \displaystyle\frac{n(n+1)}{2} .

Case 2:  Largest integer is odd

If the largest integer is odd, we can only pair n - 1 integers.  We can pair 1 and n - 1, 2 and n - 2 and 3 and n - 3 and so on.

first-n-integers

The sum of each pair above is n and there are \frac{n - 1}{2} pairs. So the sum of the first n - 1 positive integers is \frac{n(n-1)}{2}. But do not forget that we still have to add the largest digit which is n.  So, the sum of all the numbers from 1 to n where n is odd is

\displaystyle\frac{n(n-1)}{2} + n = \displaystyle\frac{n(n+1)}{2}

As we can see, in any case, the sum of the first n positive integers is n(n+1)/2.

The generalization above is not considered as a proof of the sum of all integers. A formal proof called mathematical induction is needed to show that it is true to all positive integers.

4 thoughts on “The Sum of the First n Positive Integers

  1. It’s funny, I have used this method several times before without paying much attention to the math behind it. Very interesting that Gauss reportedly did this while very young!

Leave a Reply