Rabbit Problem

Classic Problem
Let there be a pair of rabbits.

For the purpose of this exercise, the following assumptions are made.

Rabbits take one month to reach an age at which they may give birth.

Every month thereafter, a breeding pair of rabbits produce one further pair of rabbits.

Rabbits never die and never stop being able to produce further rabbits.

How many pairs of rabbits will be produced from this single pair of rabbits after one year?

Solution
At the end of the first month, the initial pair will produce $1$ new pair of rabbits, making a total of $2$ pairs.

At the end of the second month, the initial pair will produce $1$ more new pair, making a total of $3$.

At the end of the third month:
 * the initial pair will produce $1$ more new pair
 * the second pair will produce $1$ pair, as they are now able to breed.
 * This results in $5$ pairs.

At the end of month $n$, the total count of rabbit pairs is:
 * the count of the rabbits which were alive at the end of the previous month (all are still alive)

plus:
 * the count of the rabbits which were alive at the end of the month before that (as all those are of an age to breed).

Let $R \left({n}\right)$ be the number of pairs of rabbits at the end of month $n$.

Then by the above reasoning:
 * $R \left({1}\right) = 1$
 * $R \left({2}\right) = 2$
 * $R \left({n}\right) = R \left({n - 1}\right) + R \left({n - 2}\right)$

Thus it is seen that:
 * $R \left({n}\right) = F_{n + 1}$

where $F_{n + 1}$ denotes the $n + 1$th Fibonacci number.

Hence, at the end of $12$ months, there will be $F_{13} = 233$ rabbits.

Also presented as
Some sources make the additional (often unspecified) assumption that at the start of the year the rabbits are newborn (that is, are not ready to breed).

Thus they only have their first pair of offspring in the $2$nd month.

In this case, it turns out that $R \left({n}\right) = F_n$

Hence at the end of the year there are $144$ pairs of rabbits rather than $233$.