one plus one two

· puzzles, counting

Handshakes and triangular numbers

If everyone at a party of n people shakes hands with everyone else exactly once, how many handshakes are there?

Each person shakes n − 1 hands, which gives n(n − 1), but every handshake was counted twice, once from each side. So the answer is n(n − 1)/2.

n:          2  3  4   5   6   7   8
handshakes: 1  3  6  10  15  21  28

These are the triangular numbers, the same ones you get by stacking rows of 1, 2, 3, … dots. That is not a coincidence: the newest guest shakes hands with everyone already there, adding one more row.

The young Gauss story

The classroom version asks for 1 + 2 + … + 100. Pair the first and last terms, the second and second-to-last, and so on: fifty pairs that each add to 101, so 5,050. Whether or not the story about Gauss is true, the pairing is the cleanest proof of the formula.