Exercise 9.

Think back to the magical candy machine at your neighborhood grocery store. Suppose that the first time a quarter is put into the machine 1 Skittle comes out. The second time, 4 Skittles, the third time 16 Skittles, the fourth time 64 Skittles, etc.

  1. Find both a recursive and closed formula for how many Skittles the nth customer gets.

  2. Check your solution for the closed formula by solving the recurrence relation using the Characteristic Root technique.

in-context