Home Segments Index Top Previous Next

349: Mainline

Now, for another, more interesting illustration of recursion, suppose that your railroad hauls rabbits. You are asked to predict the number of cars that you will need to get the rabbits to market when they are shipped a few months from now.

Fortunately, Fibonacci figured out long ago how fast rabbits multiply, deriving a formula that gives the number of female rabbits after n months, under the following assumptions: