Problem 57710. The rabbit problem
Suppose a newly-born pair of rabbits, one male, one female, are put in a field. Rabbits are able to mate at the age of one month so that at the end of its second month a female can produce another pair of rabbits. Suppose that our rabbits never die and that the female always produces one new pair (one male, one female) every month from the second month on.
How many pairs will there be in x months?
Solution Stats
Problem Comments
-
2 Comments
Dyuman Joshi
on 17 Feb 2023
Problem needs more test cases.
Joseph
on 5 Mar 2023
you did not specify whether the pairs mate again immediately after a female gives birth, or if the pairs ever mate again.
Solution Comments
Show commentsProblem Recent Solvers12
Suggested Problems
-
Return the 3n+1 sequence for n
8086 Solvers
-
Find relatively common elements in matrix rows
1961 Solvers
-
607 Solvers
-
122 Solvers
-
Find the position of first minimum value in an integer array with numbers
175 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!