Lesson goal: See how a line grows from a funny growth pattern

Previous: Animated text-banner | Home | Next: Introduction

Remember drawing lines on a number line, when you were first learning about numbers? Here's a twist on that (Salkind, 1952):

Suppose a line is $1$ inch long (exists between 0 and 1 on the x-axis of your number line). It grows toward the right according to:

$1+\frac{1}{4}\sqrt{2}+\frac{1}{4}+\frac{1}{16}\sqrt{2}+\frac{1}{16}+\frac{1}{64}\sqrt{2}+\frac{1}{64}+...$

If this growth process goes on forever, how long will the line become? Your choices are:

A. $\infty$
B. $\frac{4}{3}$
C. $\frac{8}{3}$
D. $\frac{1}{3}(4+\sqrt{2})$
E. $\frac{2}{3}(4+\sqrt{2})$

What's your answer? (A-E)?

Now you try. You can't expand this to infinite terms on a computer, but you can take it to many terms, like 20, 50, or 100. Determine what the sum appears to approach after 5-10 terms.

Type your code here:


See your results here:

First, try to see the pattern in the terms after the $1+$.

Next, if you can run a for-loop from 1 to some-number-of-terms (in the variable, i, how could you work i (=1,2,3,4,5, etc.) into this pattern?

In the starter code above, we're calling the changing denominator in the pattern d. Fix the d= line, then use it to program in the formula after the sum=sum+ line to starting adding up the terms. Dismiss.

Show a friend, family member, or teacher what you've done!

Here is a share link to your code:

Does your code work? Want to run it on your iPhone?

Here's your code:

  1. Use [Control]-[C] (Windows) or [⌘]-[C] (MacOS) to copy your code.

  2. Paste it using [Control]-[V] (Windows) or [⌘]-[V] (MacOS) into this page

  3. Then click the "Use on iPhone" button that you'll see.