CoursesAIMathCodePhysicsAbout and FAQ

TwiddleLab / Math / Counting and Patterns

Infinite Sums That Stop

Lesson 7 of 11 · 7 min · Free, no account needed

What you will learn

  • 1/2 + 1/4 + 1/8 + ... never ends, but the total gets as close to 1 as you like and never passes it.
  • A geometric series a + ar + ar² + ... adds up to a ÷ (1 - r) when r is between -1 and 1.
  • If the terms do not shrink (r is 1 or more), the sum grows forever.
  • AI agents use this: rewards weighted by γ, γ², γ³... add up to a finite value.

Start the lesson

How the lesson goes

  1. Walk halfway to the door, then half the rest, then half again...

    Do you ever get there? Drag to where you think you end up.

  2. Fill the square, half of the gap at a time.

    Tap the empty part. Watch the total.

  3. Now each term is r times the last: 1 + r + r² + ...

    Turn r until the whole infinite sum lands on 4.

    The sum of 1 + r + r² + ... is 1 ÷ (1 - r) for r below 1, and 1 ÷ 0.25 = 4.

  4. This is a geometric series.

    Adding a geometric sequence forever gives a geometric series: a + ar + ar² + ...

    If r is between -1 and 1, it converges: the total is a ÷ (1 - r). Halves: 1/2 ÷ (1 - 1/2) = 1.

    If the terms don't shrink, it diverges: it grows without end.

  5. 1/3 + 1/9 + 1/27 + ... = ?

    A fraction like 1/2 is fine.

    a = 1/3 and r = 1/3, so the sum is (1/3) ÷ (1 - 1/3) = (1/3) ÷ (2/3) = 1/2.

  6. Which infinite sums stop at a number?

    Drag each one into its box.

  7. Game: bounce. Make the ball's total path hit the target.

    The ball drops 10 m and keeps a share r of its height each bounce. Set r, then Drop.

  8. An AI agent values future rewards less and less.

    A point every step, worth γ, γ², γ³... today. Turn γ until all of them add up to 10.

    With weights 1, γ, γ², ... the total is 1 ÷ (1 - γ). For a total of 10, 1 - γ = 0.1, so γ = 0.9.

  9. Shrinking terms can add up to a finite total.

    Back to the hallway. Take the steps and compare with your bet.

Previous lesson: Adding Up a Sequence · Next lesson: Proof by Dominoes · Part of the course: Counting and Patterns

Lessons are interactive and need JavaScript. Turn it on to play them.

Loading TwiddleLab