Fibonacci

Fibbonacci sequence
The series begins with 0 and 1. After that, use the simple rule: > **Add the last two numbers to get the next.** 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987,...  You might ask where this came from? In Fibonacci's day, math competitions and challenges were common. For example, in 1225 Fibonacci took part in a tournament at Pisa ordered by the emperor himself, Frederick II. It was in just this type of competition that the following problem came about:

> "How many pairs of rabbits will there be a year from now?" The ideal set of conditions was a follows: > 1. You begin with one male rabbit and one female rabbit. These rabbits have just been born. > 2. A rabbit will reach sexual maturity after one month. > 3. The gestation period of a rabbit is one month. > 4. Once it has reached sexual maturity, a female rabbit will give birth every month. > 5. A female rabbit will always give birth to one male rabbit and one female rabbit. > 6. Rabbits never die. > So how many male/female rabbit pairs are there after one year (12 months)? > > A Rabbit > Month #0 - At the beginning of the experiment, there is one pair of rabbits (condition #1). > Month #1 - After one month, the two rabbits have mated but have not given birth. Therefore, there is still only one pair of rabbits. > Month #2 - After two months, the first pair of rabbits gives birth to another pair, making two pair in all. > Month #3 - After three months, the original pair gives birth again, and the second pair mate, but do not give birth. This makes three pair. > Month #4 - After four months, the original pair give birth, and the pair born in month #2 give birth. The pair born in month #3 mate, but do not give birth. This makes two new pair, for a total of five pair. > Month #5 - After five months, every pair that was alive two months ago gives birth. This makes three new pair, for a total of eight. > > This keeps continuing.. and how to solve this is very simple: > > Imagine that there are //x////n// //pairs// of rabbits after //n// months. The number of pairs in month //n//+1 will be //x////n// (in this problem, rabbits never die) plus the number of new pairs born. But new pairs are only born to pairs at least 1 month old, so there will be //x////n//-1 new pairs. > //xn //+1 = //xn // + //xn //-1

> > Also this is called the recursive sequence because it allows us to find the //n//th term if we know the preceding term. Meaning that we can find the second term from the first term, and the third term from the second term, the ffourth term from the third term and so on. > > > >