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.


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 $latex 100$ integers, the sum of the largest and the smallest integer is $latex 101$. Also, the sum of the second largest and the second smallest is $latex 101$. This also goes with the third largest and the third smallest and so on. Since there are the first $latex 100$ numbers can be divided into $latex \frac{100}{2}=50$ pairs, each of which has a sum of $latex 101$, the sum of all the numbers is $latex 50(101) = 5050$. We will use this strategy to generalize. We explore the sum of the first positive n integers.

In adding the first $latex n$ integers, we have two cases. The first case, if the largest integer is even, like $latex 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 $latex 1$ and $latex n$, $latex 2$ and $latex n – 1$, $latex 3$ and $latex n – 2$, and so on.


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

$latex \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 $latex n – 1$ integers.  We can pair $latex 1$ and $latex n – 1$, $latex 2$ and $latex n – 2$ and $latex 3$ and $latex n – 3$ and so on.


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

$latex \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 $latex n$ positive integers is $latex 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.

5 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!

  2. Pingback: Month in Review - January 2013

  3. Pingback: The Derivation the Formula of the Arithmetic Sequence

  4. Pingback: Sum of the First n Positive Integers: Another Solution

Leave a Reply

Your email address will not be published. Required fields are marked *