Magic Beans


 

Story.

A magician claimed that he created 200 magic beans. And he offered them for sale, one at a time. He priced them as follows:

1st bean

2nd bean

3rd bean

4th bean

5th bean

...

n-th bean

...

200th bean

1/4 of a dollar = 25¢

1/5 of a dollar = 20¢

1/6 of a dollar = 17¢ (rounded to the nearest cent)

1/7 of a dollar = 14¢ (rounded to the nearest cent)

1/8 of a dollar = 13¢ (12.5¢ still rounds up)

 

1/(n+3) of a dollar, rounded to the nearest cent

 

1/203 of a dollar rounded is 0, so the bean was free.

All the beans were sold almost immediately. How much money did the magician earn?

 

Task 1.

You have 5 minutes to estimate the magician's earnings. Write your estimate on a piece of paper, sign it, and hand it to the teacher. At the end we'll see who made the best guess.

 

Task 2.

A package of beans, a clear plastic jar, a TI-34 II calculator.

Question: How many are 200 beans?

Let n be the number of students present. Compute 200 INT n. Then each student puts the quotient of beans from the package into the jar, and the teacher puts in the remainder.

 

Example.

n = 23 students.

200 INT 23 [=]       8       16

So each student puts 8 beans into the jar, and the teacher puts in 16 beans.

 

Task 3.

Prepare a program for the TI-34 II that allows you to compute the amount the magician has earned after n beans have been sold.

 

Program.

Variable A holds the number of beans sold, and variable B holds the amount of money.

Define OP1=A+1→A, and OP2=B+round((A+3)^-1,2)→B.

 

0→A [=]

0→B [=]

Repeat,

OP1 OP2

 

Table

Number of beans sold:     Money in dolars:
10 1.35
20 1.91
30 2.26
40 2.56
50 2.73
60 2.93
70 3.06
80 3.16

 

 

Task 4.

Do we really need to compute more, or we can figure out the result in an easier way? We can figure out the result in an easier way!

 

Solution.

Beans are free if 1/(n+3) < .005 (a value less than 1/2 cent rounds to 0).

So if n > 1/.005 - 3 = 197, then the nth bean is free. Thus 200-197 = 3 beans are free.

Beans cost less than 2 cents if 1/(n+3) < .015. (Solving this, we get n > 63.67.) So if n > 63.7, and if n < 197, then they cost exactly 1¢.

Therefore, after the first 70 beans were sold for $3.06, 197-70 = 127 beans were sold for $1.27, and the remaining 3 were given for free.

 

So the total cost of the beans was $3.06 + $1.27 = $4.33.

Now check the guesses to see who came closest!

 

 

Task 5.

Write and run a program for the TI-83 to compute the cost of 200 beans.

 

Solution.

Program:BEANS

:0→B

:For(A,1,200)

:B+round((A+3)^-1,2)→B

:End

:Disp B

 

It returns 4.33.

 

Compare this program with one used on the TI-34 II.


If you want your program to be more interactive, and to show each total for each new bean sold, and to require that you press enter after every bean, try this:

 

Program:BEANS

:0→B

:For(A,1,200)

:B+round((A+3)^-1,2)→B

:Fix 0

:Display A

:Fix 3

:Display B

:Disp""

:Pause

:End

:Disp B

 

1

.250

2

.450

3

.620

4

.760

5

.890

6

1.000

7

1.100

8

1.190

9

1.270

10

1.35

 

.

..

...

 


Webpage Maintained by Owen Ramsey
Lesson Index