# Techniques for Adding the Numbers 1 to 100

There’s a popular story that Gauss, mathematician extraordinaire, had a lazy teacher. The so-called educator wanted to keep the kids busy so he could take a nap; he asked the class to add the numbers 1 to 100.

This is a companion discussion topic for the original entry at http://betterexplained.com/articles/techniques-for-adding-the-numbers-1-to-100/

Thanks alot

You’re welcome Sandra – I’m always interested in finding several explanations for an idea and seeing which ones work for different people.

This is great. It is exactly what I wanted. A big thank you

wow this has been buggin me for quit some while, Thank you for the answer

[…] But we remember that adding the numbers 1 to n = n(n + 1)/2. Don’t confuse this with n(n-1)/2, which is C(n,2) or the number of pairs of n items. They look almost the same! […]

hi our maths teacher mrs donally taught us this using step 2 it was very intresting

hi i like this website i’ve never thought about his before

how do you send this to a friend by mail?

Hi Suzie, I’m glad you liked it!

If you’d like to share by email, you can copy and paste this link:

Here is a more generic way to think about this that lets you calculate any equally spaced series of numbers:

1+2+3+4+5 = 15

n = number of digits in the set
a = the first digit in the set
b = the last digit in the set

(n(a+b))/2 = total
(5(1+6))/2 = 15

1 3 5 7 9 = 25
(5(1+9))/2 = 25

The explanation is really the same as the first explanation above. The difference is that we don’t automatically add 1, we add the first number in the set. Adding the first number to the last number is how we “pair” each number together. Pairing means to group each number in twos such that all pairs sum to the same number (which is why this only works on equally spaced digits).

3 5 7 9 11 = 35
(5(3+11))/2 = 35

5 9 13 = 27
(3(5+13))/2 = 27

Hi xilplaxim, thanks for the insight! Yep, you can extend the explanations above to almost any sequence. Here’s something interesting as well that you made me think of – let’s say your pattern is

1 2 _ 4 5 _ 7 8 _ 10 11 _ 13 14 …

(multiples of 3 are intentionally removed). That seems like a tricky pattern to add up, but you can realize it’s the same as the full pattern

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

minus the “holes”

3 6 9 12 15

You can use the formula to find the full pattern (1 to 15 = 1516/2 = 120) and subtract off the holes using your formula (3+6+9+12+15) = 518/2 = 45). So we do 120 - 45 and get 75, which is the sum (details here).

Your pattern formula can help subtract away any “gap” you want, which is pretty interesting! Thanks again for the note.

can we use the following method to sum when there are odds?
Instead of 0 can we assume n+1 as our last no i.e.n and afterwards subtract tht no. from the sum.

Thanks, this helped me a lot

So how would I figure out the ammount of odd numbers from 1-100?

Hi PJ, good question. To find the odd numbers from 1-100 (1 to 99, really), I’d use technique #2 (Use two rows):

``````
1  3  5  7  ... 97 99
99 97 95 93 ... 3  1
```
```

Notice how each row ads to 100 (n). How many rows do we have? 50. [1-4 is 2 odd numbers, 1-6 has 3 odd numbers… 1-n will have n/2 odd numbers). Lastly, we have twice the amount of numbers we need, so we must divide by 2 again.

So the sum of odd numbers 1 to n [where n is even] would be n * (n/2) * 1/2. In this case, 100 * 50 * 1/2 = 2500.

When I was 12 or 13 (about 3 years ago), I found this way to derive the formula, which is quite similar but not the same as your triangle method.

x
xx
xxx
xxxx
xxxxx

The number of Xs is the sum of 1, 2, 3, 4, and 5. Here’s how I derived the formula (Xs are the important elements of the triangle, Os are used to show what I don’t count, parentheses are used to show what I eliminate, and N is the number you want the sum up to).

xxxxx N

This is the number you want the sum of.

xoooo
xxooo
xxxoo N^2
xxxxo
xxxxx

Squaring N, you get the triangle and some extra elements (which need to be eliminated)

xoooo
xxooo
xxxoo N^2-N
xxxxo
(xxxxx)

There are no Os you need to eliminate in the bottom row, so you can remove it and add it back later.

x(oooo)
xx(ooo)
xxx(oo) (N^2-N)/2
xxxx(o)
(xxxxx)

Half of the elements above the bottom row are Os, so dividing by two gives you the number of Xs.

x(oooo)
xx(ooo)
xxx(oo) (N^2-N)/2+N
xxxx(o)
xxxxx

Add the original bottom row. You now have the triangle.

Time for my favorite part: changing how an equation looks. (N^2-N)/2+N is too sloppy.

(N^2-N)/2+N Original Equation

N^2/2 -N/2+N Distribute

(N^2+N)/2 Factor out 1/2

(N)(N+1)/2 Factor out N

That’s how I thought about it at the time, when I was bored one night. Yes, I developed theorems when I was 13. I still haven’t stopped. I like that way of looking at it, and when I showed that to my math class, most everyone understood what I was doing. Just goes to show you that there are no end to the ways that you can derive a formula.

Hi Zac, thanks for the awesome comment! That’s a cool way to look at it, I like the approach of making a full box (n^2) and then taking pieces away.

Yep, it goes to show that there are so many ways of looking at a single formula :).

[…] FYI: The trick is to think - hmm, take one number from the top and one number from the bottom - ie, 99+1=100.  Then take the next one from top and bottom because 98+2=100 also.  97+3=100, 96+4=100, etc.  So now you’ve gotten rid of 49 of them (all the way to 49+51=100), so you have 4900, then you just have the 50 and the 100 left over, so the answer is 5050.  I even looked online to see if this shortcut was there, but this one guy went all way too complex with his “possible solutions.” […]

[…] I just read an entry, which explains the following formula, not in 2 but 4 different ways. Sum from 1 to n =  […]