An

arithmetic sequence is one where the next term of the sequence is generated by adding a

constant to the last term. For example, 1 + 3 + 5 + 7 + 9 is an arithmetic sequence with a

common difference of two.

To find the sum of an arithmetic series (written as `S`_{n}) with `n` terms, a first term `a` and a last term `l` we use the formula -

`S`_{n} = `n` ( `a` + `l` / 2 )

We derive this formula from an observation made by Carl Friedrich Gauss as a schoolchild. He noted that in an arithmetic sequence such as -

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10

Each pair of values (1 and 10, 2 and 9, 3 and 8 etc) has the same sum. Therefore the sum of this sequence is the number of pairs multiplied by the sum of each pair.

That method seems simple enough, and it's a little too simple. It only works for sequences with an even number of terms - what about this one?

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9

A formula for the sum of an arithmetic sequence should surely be able to cope with sequences with an odd number of terms. It terms out that we can achieve the same result by finding the average of the first and last terms and multiplying by the number of terms. Hence, for the above -

Sum = (1 + 9 / 2) * 9 = 45

We have arrived at a general formula for the sum of an arithmetic sequence. It is -

`S`_{n} = `n` ( `a` + `l` / 2 )

**Example**

The sum of this sequence 1 + 3 + 5 + 7 + 9 + 11, is given by -

`S`_{n} = 6 * ( 1 + 11 / 2 ) = 36.