# How to Add the Numbers 1-100 Quickly: Summing Arithmetic Sequences

*I am a former maths teacher and owner of DoingMaths. I love writing about maths, its applications and fun mathematical facts.*

## Carl Friedrich Gauss

## Carl Friedrich Gauss - 'Princeps Mathematicorum'

Carl Friedrich Gauss (1777 - 1855) is one of the greatest and most influential mathematicians of all time. He made many contributions to the fields of mathematics and science and has been referred to as the *Princeps Mathematicorum* (Latin for 'the foremost of mathematicians). However, one of the most interesting tales about Gauss comes from his childhood.

## Adding the Numbers From 1-100: How Gauss Solved the Problem

The story goes that Gauss's primary school teacher, being the lazy type, decided to keep the class occupied by getting them to sum all of the numbers from 1 - 100. With a hundred numbers to add up (without calculators in the 18th century) the teacher thought that this would keep the class busy for quite some time. He hadn't reckoned on the mathematical ability of young Gauss however, who just a few seconds later came back with the correct answer of 5050.

Gauss had realised that he could make the sum a lot easier by adding the numbers together in pairs. He added the first and the last numbers, the second and the second to last numbers and so on, noticing that these pairs 1 + 100, 2 + 99, 3 + 98, etc. all gave the same answer of 101. Going all the way to 50 + 51 gave him fifty pairs of 101 and an answer of 50 × 101 = 5050.

## Summing Integers from 1 - 100 on the DoingMaths YouTube channel

## Extending Gauss's Method to Other Sums

Whether this story is actually true or not is unknown, but either way it gives a fantastic insight into the mind of an extraordinary mathematician and an introduction to a speedier method of adding together arithmetic sequences (sequences of numbers formed by increasing or decreasing by the same number each time).

First of all let's look at what happens for summing sequences like Gauss's, but to any given number (not necessarily 100). For this we can expand Gauss's method quite simply.

Suppose we want to add together all of the numbers up to and including *n*, where *n* represents any positive whole number. We will add together the numbers in pairs, first to last, second to second to last and so on as we did above.

Let's use a diagram to help us visualise this.

## Summing the Numbers From 1 to n

## Summing the Numbers From 1 to n

By writing the number *1 − n* and then repeating them backwards below, we can see that all of our pairs add up to *n + 1*. There are now *n* lots of *n + 1* in our picture, but we got these using the numbers 1 - *n* twice (once forwards, one in reverse), hence to get our answer, we need to halve this total.

This gives us a final answer of 1/2 × n(n + 1).

## Using Our Formula

We can check this formula against some real cases.

In Gauss's example we had 1 - 100, so n = 100 and the total = 1/2 × 100 × (100 + 1) = 5050.

The numbers 1 - 200 sum to 1/2 × 200 × (200 + 1) = 20 100 while the numbers 1 - 750 sum to 1/2 × 750 × (750 + 1) = 218 625.

## Expanding Our Formula

We don't have to stop there however. An arithmetic sequence is any sequence where the numbers increase or decrease by the same amount each time e.g. 2, 4, 6, 8, 10, ... and 11, 16, 21, 26, 31, ... are arithmetic sequences with increases of 2 and 5 respectively.

Suppose we wanted to sum the sequence of even numbers up to 60 (2, 4, 6, 8, ..., 58, 60). This is an arithemetic sequence with a difference between terms of 2.

We can use a simple diagram as before.

## Summing the Even Numbers up to 60

## Summing the Even Numbers up to 60

Each pair adds up to 62, but it is slightly trickier to see how many pairs we have this time. If we halved the terms 2, 4, ..., 60, we would get the sequence 1, 2, ..., 30, hence there must be 30 terms.

We therefore have 30 lots of 62 and again, because we have listed our sequence twice, we need to halve this so 1/2 × 30 × 62 = 930.

## Creating a General Formula for Summing Arithmetic Sequences When We Know the First and Last Terms

From our example we can see quite quickly that the pairs always add up to the sum of the first and last numbers in the sequence. We then multiply this by how many terms there are and divide by two to counteract the fact that we have listed each term twice in our calculations.

## Recommended for You

Therefore, for any arithmetic sequence with *n* terms, where the first term is *a* and the last term is *l* we can say that the sum of the first *n* terms (denoted by S_{n}), is given by the formula:

S_{n} = 1/2 × n × (a + l)

## What About if the Last Term is Unknown?

We can expand our formula a little further for arithmetic sequences where we know there are *n* terms but we don't know what the n^{th} term (the last term in the sum) is.

E.g. find the sum of the first 20 terms of the sequence 11, 16, 21, 26, ...

For this problem, n = 20, a = 11 and d (the difference between each term) = 5.

We can use these facts to find the last term *l*.

There are 20 terms in our sequence. The second term is 11 plus one 5 = 16. The third term is 11 plus two fives = 21. Each term is 11 plus one fewer 5s than its term number i.e. the seventh term will be 11 plus six 5s and so on. Following this pattern, the 20^{th} term must be 11 plus nineteen 5s = 106.

Using our previous formula we therefore have the sum of the first 20 terms = 1/2 × 20 × (11 + 106) = 1170.

## Generalising the Formula

Using the method above, we can see that for a sequence with first term *a* and difference *d*, the *n*^{th} term is always a + (n − 1) × d, i.e. the first term plus one fewer lots of *d* than the term number.

Taking our previous formula for the sum to *n* terms of S_{n} = 1/2 × n × (a + l), and substituting in l = a + (n − 1) × d, we get that:

S_{n} = 1/2 × n × [a + a + (n − 1) × d]

which can be simplified to:

S_{n} = 1/2 × n × [2a + (n − 1) × d].

Using this formula on our previous example of summing the first twenty terms of the sequence 11, 16, 21, 26, ... gives us:

S_{n} = 1/2 × 20 × [2 × 11 + (20 − 1) × 5] = 1170 as before.

## Recap

In this article we have discovered three formulae that can be used to sum arithmetic sequences.

For simple sequences of the form 1, 2, 3, ...., n,:

S_{n} = 1/2 × n × (n + 1)

For any arithmetic sequence with *n* terms, first term *a*, difference between terms *d* and last term *l*, we can use the formulae:

S_{n} = 1/2 × n × (a + l)

or

S_{n} = 1/2 × n × [2a + (n − 1) × d]

*This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.*

**© 2021 David**