  # Ken Ward's Mathematics Pages

## Series

### Sums of the First n Natural Numbers

The sum of the first n natural numbers, Sn, is: ### Contents

Sum of n of the 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 Sn Δ1 Δ2 0 1 2 3 4 5 0 1 3 6 10 15 1 2 3 4 5 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, [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: 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: Which simplifies to: 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. Expanding the (k+1)th term: Expanding (n+1)2,  and rounding up similar terms: Which gives us the sum of the first n natural numbers: The following graph is of y=x, and the rectangles represent the natural numbers 1, 2, 3, 4: 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: If we take En to be the error on the approximation to n terms: 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: #### Second Approach With Errors

As we cannot figure out the error this easily every time, we try another approach: [3.1]
And the error on Sn-1: [3.2]
Noting the difference between the two sum, in preparation for subtracting  3.2 from 3.1: [3.3]
Subtracting 3.2 from 3.1, taking into account 3.3: [3.4]
Simplifying and rearranging: [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. The area under the graph approximates the sum of the natural numbers, so: [3.21]
With En as the error on Sn: [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): [3.23]
Working out the integral, we get: [3.24]
Replacing the integral in 3.23: [3.25]
Simplifying the sum, adding it up: So substituting our value for En in 3.22 we get: 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 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): Continuing to unravel: And one more: A pattern becomes clear. So we can write a general term, the k-th term: [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 [3.3.2]
The sum  above is one n short of Sn: [3.3.3]
Substituting 3.3.3 in 3.3.2: Rounding up stragglers: And finally, ### 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: [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, [4.2]

Factorising part of 4.1: [4.3]

If we form this expression [4.4]

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

 n 2n-1 (2n-1)2 8x q +1 8q+1 1 1 1 8x 0 +1 1 2 3 9 8x 1 +1 9 3 5 25 8x 3 +1 25 4 7 49 8x 6 +1 49 5 9 81 8x 10 +1 81 6 11 121 8x 15 +1 121 7 13 169 8x 21 +1 169 8 15 225 8x 28 +1 225 9 17 289 8x 36 +1 289 10 19 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. [4.6]

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

Rearranging and expanding the square: [4.8]

Adding similar terms and dividing by 8, we get [4.9]

And adding n to both sides: [4.10]

There is one issue, which we deal with in the next section: How can the following: [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 m m-n n m 0 1 2 3 4 5 0 1 1 2 2 3 0 0 1 1 2 2 6 7 8 9 10 11 3 4 4 5 5 6 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) [5.1]

Substituting this into 2m2±m, from 4.4, gives: [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, [5.3]

Substituting this in 5.2, we get: 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): [6.1]

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

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

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

### Application - Sum of Even Numbers

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

Expanding the left-hand side: [7.4]

Applying our formula for the sum of the first n natural numbers: [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: [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. [7.6]

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

Which gives us: [7.8]

Collecting like terms: [7.9]

Factorising gives us the formula for the series of natural numbers from n1 to n2: Ken Ward's Mathematics Pages

# Faster Arithmetic - by Ken Ward

Ken's book is packed with examples and explanations that enable you to discover more than 150 techniques to speed up your arithmetic and increase your understanding of numbers. Paperback and Kindle:
Buy now at Amazon.com 