Add 1 to n in one step
Adding the first hundred whole numbers takes one multiplication, not a hundred additions.
What the symbols mean
- how many numbers you add
- the sum of each pair: first + last, second + second-to-last, and so on
- because writing the list twice counts every pair two times
Why it works — the picture
Write the list 1 to n, then write it backwards underneath. Every column adds up to the same number, n+1, and there are n columns. That is a rectangle n tall and n+1 wide, and your original list is exactly half of it. Or see it as a staircase of blocks: two staircases snap together into a rectangle.
Try it yourself
- Find 1+2+...+100 in your head using pairs (1+100, 2+99, ...).
- Use the same trick to add 5+10+15+...+100.
- Why does the trick need n(n+1) to be even? Check n=4 and n=5.
Where it’s used in real life
Programmers use it to count how many steps a nested loop takes; the number of pairs among n objects is a close cousin of it.
The story behind it
A famous story says the young Carl Friedrich Gauss used this trick in school; the details are folklore, but the pairing idea is very old.