TwiddleLab / Math / Counting and Patterns
Adding Up a Sequence
What you will learn
- Two copies of the staircase 1 + 2 + ... + n make an n by (n + 1) rectangle.
- So 1 + 2 + ... + n = n(n + 1) ÷ 2. For n = 100 that is 5,050.
- Any arithmetic series: (first + last) × count ÷ 2. Pair the ends: every pair has the same sum.
- Selection sort on n cards makes (n - 1) + ... + 1 comparisons: a staircase again.
How the lesson goes
Add every number from 1 to 100 in ten seconds.
A 9-year-old named Carl Gauss is said to have done it in 1786. Drag to your bet.
1 + 2 + 3 + 4 + 5 as a staircase. Here is a flipped copy.
Drag the copy onto the staircase.
Find the staircase with exactly 55 cubes.
Slide n. The copy always fills the rectangle.
The staircase is half of an n by (n + 1) rectangle. 10 × 11 = 110, half is 55.
Adding up a sequence is a series.
The sum of an arithmetic sequence is an arithmetic series.
1 + 2 + ... + n = n(n + 1) ÷ 2: half of the rectangle.
Any arithmetic series: (first + last) × count ÷ 2.
Gauss's trick without cubes: pair the ends.
Tap the partner of the glowing number so the pair adds to 11.
Now the hook: 1 + 2 + 3 + ... + 100 = ?
Pair 1 with 100, 2 with 99, and so on: 50 pairs, each 101. 50 × 101 = 5,050.
A theater: 20 seats in row 1, each row 2 more, 10 rows.
Fill the formula with tiles to count all the seats.
The rows form an arithmetic sequence from 20 to 38. Pairing ends gives 58 per pair, and 10 rows make 5 pairs: 290.
Selection sort: find the smallest, move it to the front, repeat.
Run the passes and count the comparisons.
Game: beat Gauss. Four sums, ten seconds each.
Tap the right total before the clock runs out.
Previous lesson: Sequences: Spot the Rule · Next lesson: Infinite Sums That Stop · Part of the course: Counting and Patterns
Lessons are interactive and need JavaScript. Turn it on to play them.