How would you go about adding up all the integers from 1 to 100? Tap them into a calculator? Write a little computer code? Or look up the general formula for summing integers?

Legend has it that the task of summing those numbers was given to the young Carl Friedrich Gauss by his teacher at primary school, as a punishment for misbehaving. Gauss didn't have a calculator or computer, no one did at that time, but he came up with the correct answer within seconds. Here's how he did it.

Notice that you can sum the numbers in pairs, starting at either end. First you add 1 and 100 to get 101. Next it's 2 and 99, giving 101 again. The same for 3 and 98. Continuing like this, the last pair you get is 50 and 51 and they give 101 again. Altogether there are 50 pairs all adding to 101, so the answer is 50 x 101 = 5050. Easy — if you're Gauss.

## Comments

## Avoiding multiplying

Would it not be simpler to add:

100

99 + 1

98 + 2

til

51 + 49

giving 50 x 100

then just add on the 50?

## Clever sums

I think the simplest way is to realise there are 100 numbers with an average value of 50.5, so the total is 100 x 50.5 = 5050.

## Gauss

There is no basis for the story that the teacher was punishing Gauss. He was a trained professional (England didn't even have schools at the time, let alone qualified teachers). He even had a teaching assistant - who himself became a professor of mathematics. Teacher and assistant bought him books and arranged for him to go to higher school and thence university. His teacher [Johann Georg Büttner] should be celebrated for his insight and attention to his pupils' welfare.