164k views
0 votes
A leprechaun places a magic penny under a girl's pillow. The next night there are 2 magic pennies under her pillow. The following morning she finds 4 pennies. Apparently while she sleeps each penny turns into two magic pennies. The total number of pennies seen under the pillow each day is the grand total; that is, the pennies from each of the previous days are not being stored away until more pennies magically appear. How many days would elapse before she has a total of more than $2 Billion?

User Ygetarts
by
8.7k points

1 Answer

2 votes

Answer:

  • 32 days

Step-by-step explanation:

Simulate (build a table) the growing of the number of pennies for some nights to figure out the pattern:

First night: 1 penny = 2⁰

Second night: 1 × 2 pennies = 2¹

Third night: 2 × 2 = 2²

Fourth nigth: 2² × 2 = 2³

nth night: 2ⁿ⁻¹

You want 2ⁿ⁻¹ ≥ 2,000,000,000

Which you solve in this way:

  • 2ⁿ⁻¹ ≥ 2,000,000,000

  • 2ⁿ⁻¹ ≥ 2,000,000,000

  • n-1 log (2) ≥ log (2,000,000,000)

  • n - 1 ≥ log (2,000,000,000) / log (2)

  • n - 1 ≥ 30.9

  • n ≥ 31.9

Since n is number of days, it is an integer number, so n ≥ 32.

Hence, she will have a total of more than $ 2 billion after 32 days.

You can prove that by calculating 2³² = 2,147,483,648.

User Hussien Fahmy
by
8.1k points