nav.gif (1245 bytes)mathematics

Ken Ward's Mathematics Pages

Series

Sums of the First n Natural Numbers

The sum of the first n natural numbers, Sn, is:
sumNatNumbersFormula.gif
See also airthmeticGeometricSeries.htm

Contents

Sum of n of the Natural Numbers
  1. Sum to n of the Natural Numbers Using Differences
  2. Sum of the natural numbers using summation
    1. Second Try With Summation
  3. Sum of Natural Numbers Using Errors
  4. Second Approach With Errors
  5. Using Infinite Calculus to find the Sum of the first n Natural Numbers
  6. Summing the first n natural numbers by finding a general term
  7. Summing the First n Natural Numbers Using Number Theory
  8. New Formula for the Sum of the Natural Numbers
  9. Application - Sum of Odd Numbers
  10. Application - Sum of Even Numbers
  11. Application - Sum of Part of the Series of Natural Numbers

Sum of first n Natural Numbers

We have already  used Gauss's trick to sum the natural numbers.

Sum to n of the Natural Numbers Using Differences

We can find the formula for a set of numbers using differences.
For instance, the following table shows the sum of some natural numbers, but we have also used zero, for convenience:
n 0 1 2 3 4 5
Sn 0 1 3 6 10 15
Δ1
1 2 3 4 5
Δ2

1 1 1 1
Sn is the sum of the numbers to n.

Because we find that Δ2 produces constant values, we assume the formula for the sum of the natural numbers is a quadratic, of the form an2+bn+c.

Using our values, we substitute 0, 1, and 3 in the Equation:
n Equation Equation Number
0 c=0 1
1 a+b=1 2
2 4a+2b=3 3

 In Equations 2 and 3, we have noted that c=0.
By subtracting twice Equation 2 from Equation 3, we get:
2a=1,
So
a=1/2
Substituting the value for a in Equation 2, we find that b is also 1/2,
So the sum of the first n natural numbers, Sn,
naturalNumbersSum.gif
[As a word to the wise, the constant value in the table above is always (n!)a, so in the example, a=1/2!, or 1/2. The sum of the coefficients of the sum of the powers of the natural numbers is always 1.]

Sum of the natural numbers using summation

In this scheme, we first fall flat on our faces. We note the relationship:
sumNat1.gif
That is, the sum of n natural numbers is the sum of n+1 natural numbers less (n+1).
Expanding the term for (k+1), we get:
sumNat2.gif
Which simplifies to:
sumNat3.gif
We can try another approach, and look for the sum of the squares of the first n natural numbers, hoping that this sum will vanish.

Second Try With Summation

Starting again, we note that the sum of the squares of the first n natural numbers is the sum of the first (n+1), less (n+1)2.
sumNat4.gif
Expanding the (k+1)th term:
sumNat5.gif
Expanding (n+1)2,  and rounding up similar terms:
sumNat6.gif
Which gives us the sum of the first n natural numbers:
sumNat7.gif

The following graph is of y=x, and the rectangles represent the natural numbers 1, 2, 3, 4:
sumNatGraph.gif
The area of the triangular graph, if we take it as representing n numbers is:
n2/2
So the sum to n terms is, approximately:
sumNatApprox.gif
If we take En to be the error on the approximation to n terms:
sumNatPlusError.gif
Looking at the graph, the error on each number is 1/2, so the error on the sum of the first n numbers, En, is n/2.
So:
sumNatFirstN.gif

Second Approach With Errors

As we cannot figure out the error this easily every time, we try another approach:
sumNatError1.gif [3.1]
And the error on Sn-1:
sumNatError2.gif [3.2]
Noting the difference between the two sum, in preparation for subtracting  3.2 from 3.1:

sumNatError3.gif [3.3]
Subtracting 3.2 from 3.1, taking into account 3.3:

sumNatError4.gif [3.4]
Simplifying and rearranging:
sumNatError5.gif [3.5]
Normally, this would be the start of things, but in this case, the error is simply a number, independent of the actual n-value, so it is the same for all n, and the error is n/2, as we found above.

Using Infinite Calculus to find the Sum of the first n Natural Numbers


This approach is similar to the previous one, but introduces a different approach that can be used with other natural number sums.

In the graph below, we have the first few natural numbers shown as rectangles on the graph y=x.
sumNatGraph.gif
The area under the graph approximates the sum of the natural numbers, so:
sumNatCalc1.gif [3.21]
With En as the error on Sn:
sumNatCalc2.gif [3.22]
Each of our rectangles in the graph have an area k∙1, so our error is k minus the area under the graph between (x=k-1 and x=k):
sumNatCalc3.gif [3.23]
Working out the integral, we get:
sumNatCalc4.gif [3.24]
Replacing the integral in 3.23:
sumNatCalc5.gif [3.25]
Simplifying the sum, adding it up:
sumNatCalc6.gif
So substituting our value for En in 3.22 we get:
sumNatCalc7.gif
Which comes as no surprise!

Summing the first n natural numbers by finding a general term

Here we unravel the right-hand side and hope to find a formula.
We note the difference between the sum of the first n natural numbers, and the sum to (n-1) is n
sumNatDiff1.gif
The idea is that we look at the terms Sn-Sn-2, et c, and write down the know differences, hoping that a pattern appears and we can write Sn-k, and then to write down the n-th term, from which we can extract a formula.

And for the sum to (n-2):
sumNatDiff2.gif

Continuing to unravel:
sumNatDiff3.gif

And one more:
sumNatDiff4.gif

A pattern becomes clear. So we can write a general term, the k-th term:

sumNatDiff5.gif [3.3.1]
We have noted that the "n" term is always kn, and the other term is a sum of the natural numbers.

Now we can make k=n, and so get our nth term, noting S0=0
sumNatDiff6.gif [3.3.2]
The sum  above is one n short of Sn:
sumNatDiff7.gif [3.3.3]
Substituting 3.3.3 in 3.3.2:
sumNatDiff8.gif

Rounding up stragglers:
sumNatDiff9.gif

And finally,
sumNatDiff10.gif

Summing the First n Natural Numbers Using Number Theory

This method actually leads to a new formula for the sum of the first n natural numbers.

According to number theory, we can represent numbers in one of these four ways:
numberThoery1.gif [4.1]
Where 4m±1 clearly represents the odd numbers.

We try to form an expression for the squares of the odd numbers by squaring 4m±1,
numberTheory2.gif [4.2]

Factorising part of 4.1:
numberTheory3.gif [4.3]

If we form this expression
numberTheory4.gif [4.4]

We can write the square of any odd number as:
numberTheory5.gif [4.5]
We can write an odd number as (2n-1), where n is a natural number.

n2n-1 (2n-1)2 8x q +1 8q+1
11 1 8x 0 +1 1
23 9 8x 1 +1 9
35 25 8x 3 +1 25
47 49 8x 6 +1 49
59 81 8x 10 +1 81
611 121 8x 15 +1 121
713 169 8x 21 +1 169
815 225 8x 28 +1 225
917 289 8x 36 +1 289
1019 361 8x 45 +1 361

We note that we can find a q value for each of the numbers, so that 8q+1 is equal to the square of the odd number.

It is possible that these q's look familiar in some way. After a short or long time, of thinking about this, we might realise that the q's are the sum of the natural numbers. 

numberTheory6.gif [4.6]

Substituting (2n-1)2 for the odd number squared and 4.6 in 4.5 we get:
numberTheory7.gif [4.7]

Rearranging and expanding the square:
numberTheory8.gif [4.8]

Adding similar terms and dividing by 8, we get

numberTheory9.gif [4.9]

And adding n to both sides:
numberTheory10.gif [4.10]

There is one issue, which we deal with in the next section: How can the following:
numberTheory4.gif [4.4, repeated]

be the same, in some way, as the sum of the first natural numbers?

New Formula for the Sum of the Natural Numbers

We have observed that in some way (2m2±m) and (n2/2+n/2) give similar results under some circumstances. As I can't see any clear relationship, I make a table:
n (n2+n)/2 m +/- 2m2+/-m
0 0 0
0
1 1 1 - 1
2 3 1 + 3
3 6 2 - 6
4 10 2 + 10
5 15 3 - 15

Naturally, the minus signs alternate and the m values occur twice for each value. Apart from this, I see nothing except... it seems I need to relate the n values to the m values.

Of course, I do another table:
n 0 1 2 3 4 5
m 0 1 1 2 2 3
m-n 0 0 1 1 2 2







n 6 7 8 9 10 11
m 3 4 4 5 5 6
m-n 3 3 4 4 5 5

(The length of the table indicates that I did not see anything quickly).

However, the following relationship comes to mind: m=ceil(n/2)
new1 [5.1]

Substituting this into 2m2±m, from 4.4, gives:
new2.gif [5.2]

If n is even, then ceil(n/2)=n/2, and the second term will be positive, giving our normal formula.

If n is odd,
new3.gif [5.3]

Substituting this in 5.2, we get:
new4.gif
which simplifies to our normal equation for the sum of the natural numbers.

Of course, I prefer our old formula!

Application - Sum of Odd Numbers

The formula for the sum of the natural numbers can be used to solve other problems.

The sum of the first n odd natural numbers is (2k-1 represents any odd number):
appOdd1.gif [6.1]

We can expand the left-hand side:
appOdd2.gif [6.2]

And use our formula for the sum of the natural numbers:
appOdd3.gif [6.3]

Rounding up like terms, the sum of the first n odd natural numbers is:
appOdd4.gif [6.4]

Application - Sum of Even Numbers

The first even numbers are (2k is always even, and represents any even number):appEven1.gif [7.3]

Expanding the left-hand side:
appEven2.gif [7.4]

Applying our formula for the sum of the first n natural numbers:
appEven3.gif [7.5]

The sum of the first n even numbers is bigger than the sum of the first n odd numbers, because the first even number (2) is bigger than the first odd number (1) and this pattern continues (4 is bigger than 3). Clearly it is always bigger by n.

The sum of the odd number is bigger than the sum of the natural numbers, because, after 1, the odd numbers are bigger than the corresponding natural number (3 is bigger than 2, and 5 is bigger than 3).

Application - Sum of Part of the Series of Natural Numbers

The sum of part of a series from n1 to n2 is:
appPart1.gif [7.5]
The sum of part of the series of natural numbers from n1 to n2 is the sum from 1 to n2-1 less the sum from 1 to n2.
appPart2.gif [7.6]

Substituting the formula for the first n natural numbers in 7.6, we get:
appPart3.gif [7.7]

Which gives us:
appPart4.gif [7.8]

Collecting like terms:
appPart5.gif [7.9]

Factorising gives us the formula for the series of natural numbers from n1 to n2:
appPart6.gif









Ken Ward's Mathematics Pages