Skip to content
PiRush

LearnPatterns

Quick sums

Add 1 + 2 + 3 + ... + 20 in seconds, the way young Gauss did, and see why the odd numbers always add up to a square.

How long would it take you to add all the whole numbers from 1 to 100? A famous story, told many times, says that a teacher in Germany once gave this sum to his class to keep them busy. One young boy, Carl Friedrich Gauss, wrote the answer, 5050, almost at once. The details may have grown in the telling, but Gauss was real, and he grew up to be one of the greatest mathematicians who ever lived. His trick is simple, and once you have seen it you can add long lists of numbers in seconds. This page also shows a second surprise: when you add the odd numbers, the answer is always a square number.

Pair the ends

Start with a smaller sum: 1 + 2 + 3 + ... + 10. Instead of adding from left to right, pair the first number with the last, the second with the second-to-last, and so on.

PairSum of the pair
1 + 1011
2 + 911
3 + 811
4 + 711
5 + 611

Every pair adds up to 11. There are 10 numbers, so there are 5 pairs. The total is 5 × 11 = 55. You can check it the slow way: it really is 55.

  1. Add the first and the last number. That is the sum of every pair.
  2. Count the numbers, and halve that count to get the number of pairs.
  3. Multiply the number of pairs by the sum of a pair.

Example 1

What is 1 + 2 + 3 + ... + 20?

  1. First plus last: 1 + 20 = 21. Every pair adds to 21: 2 + 19, 3 + 18, and so on.
  2. There are 20 numbers, so there are 10 pairs.
  3. 10 × 21 = 210.

Answer: 210

Example 2

What is 1 + 2 + 3 + ... + 100?

  1. First plus last: 1 + 100 = 101.
  2. There are 100 numbers, so there are 50 pairs.
  3. 50 × 101 = 5050.

Answer: 5050

Remember

1 + 2 + 3 + ... + n = (n × (n + 1))/2

In words: the last number, times the next number up, all divided by 2.

Why the rule always works

Write the sum twice, once forwards and once backwards, one above the other. Then add the two rows column by column.

Forwards123...99100
Backwards1009998...21
Column sum101101101...101101

There are 100 columns, and each one adds to 101. So the two rows together make 100 × 101 = 10100. But that is the sum written twice, so the sum itself is half of it: 5050. This way also works when the count is odd. For 1 + 2 + ... + 9: two rows make 9 × 10 = 90, and half of that is 45.

The same idea in dots, for 1 + 2 + 3 + 4. Write it forwards and backwards: the rows are 1 + 4, 2 + 3, 3 + 2 and 4 + 1. That is 4 rows of 5, or 20 dots. The sum is half of that: 10.

Sums that do not start at 1

The pairing trick works for any adding pattern, where the numbers go up by the same step each time. Every pair still adds to first + last.

Remember

sum = (first + last) × how many numbers, all divided by 2

This is the same rule as before. From 1 to n, first + last is n + 1, and there are n numbers.

Example 3

What is 5 + 10 + 15 + ... + 50?

  1. First plus last: 5 + 50 = 55.
  2. How many numbers? They are 5 times 1, 5 times 2, ..., 5 times 10, so there are 10 of them.
  3. (55 × 10)/2 = 550/2 = 275.

Answer: 275

The odd numbers make squares

Now add up the odd numbers, starting from 1, and watch the answers.

SumTotalAs a square
111 × 1
1 + 342 × 2
1 + 3 + 593 × 3
1 + 3 + 5 + 7164 × 4
1 + 3 + 5 + 7 + 9255 × 5

Every total is a square number. The picture shows why. Start with 1 dot. Add 3 dots around it in an L shape, and you have a square of 2 by 2. Add 5 more in a bigger L, and you have a square of 3 by 3. Each new odd number is exactly the L that turns one square into the next.

The coloured layers hold 1, 3, 5, 7 and 9 dots. Together they fill a 5 by 5 square: 1 + 3 + 5 + 7 + 9 = 25.

Remember

the first n odd numbers add up to n × n

To find n, count the odd numbers: from 1 to the last odd number L there are (L + 1)/2 of them.

Example 4

What is 1 + 3 + 5 + ... + 19?

  1. Count the odd numbers from 1 to 19: (19 + 1)/2 = 10.
  2. The first 10 odd numbers add up to 10 × 10.
  3. 10 × 10 = 100.

Answer: 100

Example 5

What is 1 + 3 + 5 + ... + 29?

  1. Count the odd numbers from 1 to 29: (29 + 1)/2 = 15.
  2. The sum is 15 × 15 = 225.

Answer: 225

Try it yourself

  1. 1.What is 1 + 2 + 3 + ... + 30?

    Show the answer

    465

    There are 15 pairs, and each adds to 1 + 30 = 31. 15 × 31 = 465.

  2. 2.What is 1 + 2 + 3 + ... + 50?

    Show the answer

    1275

    (50 × 51)/2 = 25 × 51 = 1275.

  3. 3.What is 11 + 12 + 13 + ... + 20?

    Show the answer

    155

    There are 10 numbers, so 5 pairs, and each pair adds to 11 + 20 = 31. 5 × 31 = 155.

  4. 4.What is 3 + 6 + 9 + ... + 30?

    Show the answer

    165

    There are 10 numbers and first + last is 33. (33 × 10)/2 = 165.

  5. 5.What is 1 + 3 + 5 + ... + 15?

    Show the answer

    64

    From 1 to 15 there are (15 + 1)/2 = 8 odd numbers, and 8 × 8 = 64.

  6. 6.What is 1 + 3 + 5 + ... + 39?

    Show the answer

    400

    There are (39 + 1)/2 = 20 odd numbers, so the sum is 20 × 20 = 400.

Ready to test yourself?

Play Patterns: 20 seconds per question, and it gets harder as you go.