Home Segments Top Top Previous Next

451: Mainline

The following diagram shows the number of female Fibonacci rabbits at the end of every month for 6 months:

*-- One immature female 
|    *-- One mature female 
|    |    *-- One mature and one immature female 
|    |    |    *-- Two mature and one immature female 
|    |    |    |    *-- Three mature and two immature females 
|    |    |    |    |    *-- Five mature and three immature females 
v    v    v    v    v    v    
|----|----|----|----|----|--- 
     ^    ^    ^    ^    ^    
     |    |    |    |    *-- End of month 5 
     |    |    |    *-- End of month 4 
     |    |    *-- End of month 3 
     |    *-- End of month 2 
     *-- End of month 1 

Clearly, the number of female rabbits there are at the end of the nth month is the same as the number of females at the end of the previous month plus the number of females that gave birth during the current month. But, of course, the number of females that gave birth during the current month is the number of mature female rabbits at the end of the previous month, which is same as the total number of females at the end of the month before that. Thus, the following formula holds:

Rabbits(n) = Rabbits(n-1) + Rabbits(n-2)