Fibonacci number
In mathematics, the Fibonacci numbers form a sequence defined recursively by:A tiling with Fibonacci
number sized squares
Origins
This sequence was first described by Leonardo of Pisa, who was also known as Fibonacci (c. 1200), to describe the growth of a rabbit population. The numbers describe the number of pairs in a (somewhat idealized) rabbit population after n months if it is assumed that
- the first month there is just one newly born pair,
- newly born pairs become productive from their second month on,
- we have no genetic problems whatsoever generated by inbreeding,
- each month every productive pair begets a new pair, and
- the rabbits never die
The term Fibonacci sequence is also applied more generally to any function g where g(n + 2) = g(n) + g(n + 1). These functions are precisely those of the form g(n) = aF(n) + bF(n + 1) for some numbers a and b, so the Fibonacci sequences form a vector space with the functions F(n) and F(n + 1) as a basis.
In particular, the Fibonacci sequence with F(1) = 1 and F(2) = 3 is referred to as the Lucas numbers. The significance in the Lucas numbers L(n) lies in the fact that raising the Golden ratio to the nth power yields:
Explicit formula
As was pointed out by Johannes Kepler, the growth rate of the Fibonacci numbers, that is, F(n + 1) /F(n), converges to the golden mean, denoted φ. This is the positive root of the quadratic equation x^{2} − x − 1 = 0, so φ^{2} = φ + 1. If we multiply both sides by φ^{n}, we get φ^{n+2} = φ^{n+1} + φ^{n}, so the function φ^{n} is a Fibonacci sequence. The negative root of the quadratic, 1 − φ, can be shown to have the same properties, so the two functions φ^{n} and (1 − φ)^{n} form another basis for the space.
By adjusting the coefficients to get the proper initial values F(0) = 0 and F(1) = 1, we obtain
As n goes to infinity, the second term converges to zero, so the Fibonacci numbers approach the exponential φ^{n}/√5, hence their convergent ratios. In fact the second term starts out small enough that the Fibonacci numbers can be obtained from the first term alone, by rounding to the nearest integer.
Computing Fibonacci numbers
Computing Fibonacci numbers by computing powers of the golden mean is not very practical except for small values of n, since rounding errors will accrue and floating point numbers usually don't have enough precision.
The straightforward recursive implementation of the Fibonacci sequence definition is also not advisable, since it would compute many values repeatedly (unless the programming language has a feature which allows the storing of previously computed function values). Therefore, one usually computes the Fibonacci numbers "from the bottom up", starting with the two values 0 and 1, and then repeatedly replacing the first number by the second, and the second number by the sum of the two.
For huge arguments and if a bignum system is being used, a faster way to calculate Fibonacci numbers uses the following matrix equation:
Applications
The Fibonacci numbers are important in the run-time analysis of Euclid's algorithm to determine the greatest common divisor of two integers.
Matiyasevich was able to show that the Fibonacci numbers can be defined by a Diophantine equation, which led to his original solution of Hilbert's tenth problem.
The Fibonacci numbers occur in a formula about the diagonals of Pascal's triangle (see binomial coefficient).
An interesting use of the Fibonacci sequence is for converting miles to kilometers. For instance, if you want to know about how many kilometers 5 miles is, take the Fibonacci number (5) and look at the next one (8). 5 miles is about 8 kilometers. This works because it so happens that the conversion factor between miles and kilometers (1.609) is roughly equal to φ (1.618) (this is obviously somewhat useful only for very rough approximations: apart from the fact that the conversion factor is different from φ, on one hand the series ratio converges to φ, it's not constant, and on the other hand you can only use this property for Fibonacci numbers, which tend to grow apart very soon in the series).
In music Fibonacci numbers are sometimes used to determine tunings, and, as in visual art, to determine the length or size of content or formal elements. Examples include Béla Bartók's Music for Strings, Percussion, and Celesta.
Generalizations
A generalization of the Fibonacci sequence are the Lucas sequences. One kind can be defined thus:
where the normal Fibonacci sequence is the special case of P = 1 and Q = -1. Another kind of Lucas Sequence begins with V(0) = 2, V(1) = P. Such sequences have applications in number theory and primality proving.The Fibonacci polynomials are another generalization of Fibonacci numbers.
Identities
- F(n + 1) = F(n) + F(n − 1)
- F(0) + F(1) + F(2) + ... + F(n) = F(n + 2) − 1
- F(1) + 2 F(2) + 3 F(3) + ... + n F(n) = n F(n + 2) − F(n + 3) + 2
Proof of the first identity. Without loss of generality, we may assume n ≥ 1. Then F(n + 1) counts the number of ways summing 1's and 2's to n.
When the first summand is 1, there are F(n) ways to complete the counting for n − 1; and the first summand is 2, there are F(n − 1) ways to complete the counting for n − 2. Thus, in total, there are F(n) + F(n − 1) ways to complete the counting for n.
Proof of the second identity. We count the number of ways summing 1's and 2's to n + 1 such that at least one of the summands is 2.
As before, there are F(n + 2) ways summing 1's and 2's to n + 1 when n ≥ 0. Since there is only one sum of n + 1 that does not use any 2, namely 1 + … + 1 (n + 1 terms), we subtract 1 from F(n + 2).
Equivalently, we can consider the first occurrence of 2 as a summand. If, in a sum, the first summand is 2, then there are F(n) ways to the complete the counting for n − 1. If the second summand is 2 but the first is 1, then there are F(n − 1) ways to complete the counting for n − 2. Proceed in this fashion. Eventually we consider the (n + 1)-th summand. If it is 2 but all of the previous n summands are 1's, then there are F(0) ways to complete the counting for 0. If a sum contains 2 as a summand, the first occurrence of such summand must take place in between the first and (n + 1)-th position. Thus F(n) + F(n − 1) + … + F(0) gives the desired counting.
Proof of the third identity. This identity can be establshed in two stages. First, we count the number of ways summing 1's and 2's to -1, 0, …, or n + 1 such that at least one of the summands is 2.
By our second identity, there are F(n + 2) − 1 ways summing to n + 1; F(n + 1) − 1 ways summing to n; …; and, eventually, F(2) − 1 way summing to 1. As F(1) − 1 = F(0) = 0 , we can add up all n + 1 sums and apply the second identity again to obtain
- [F(n + 2) − 1] + [F(n + 1) − 1] + … + [F(2) − 1]
- = [F(n + 2) − 1] + [F(n + 1) − 1] + … + [F(2) − 1] + [F(1) − 1] + F(0)
- = F(n + 2) + [F(n + 1) + … + F(1) + F(0)] − (n + 2)
- = F(n + 2) + F(n + 3) − (n + 2).
- F(0) + F(1) + … + F(n − 1) + F(n) ways summing to n + 1;
- F(0) + F(1) + … + F(n − 1) ways summing to n;
- F(0) way summing to -1.
- (n + 1) F(0) + n F(1) + … + F(n) ways summing to -1, 0, …, or n + 1.
- (n + 1) F(0) + n F(1) + … + F(n) = F(n + 2) + F(n + 3) − (n + 2)
Tribonacci number
1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, 1705, 3136, 5768, 10609, 19513, 35890, 66012
Tetranacci number
1, 1, 2, 4, 8, 15, 29, 56, 108, 208, 401, 773, 1490, 2872, 5536, 10671, 20569, 39648, 76424, 147312, 283953, 547337
Pentanacci, hexanacci and heptanacci numbers have been computed, but they have not interested researchers much.
Repfigits
A repfigit or Keith number is an integer, that when its digits start a Fibonacci sequence with that number of digits, the original number is eventually reached. An example is 47, because the Fibonacci sequence starting with 4 and 7 (4,7,11,18,29,47) reaches 47. A repfigit can be a tribonacci sequence if there are 3 digits in the number, a tetranacci number if the number has four digits, etc. The first few repfigits are
14, 19, 28, 47, 61, 75, 197, 742, 1104, 1537, 2208, 2580, 3684, 4788, 7385, 7647, 7909
See also
External links
- The Golden Section: Phi
- Computing Fibonacci numbers on a Turing Machine
- The Fibonacci Quarterly — an academic journal devoted to the study of Fibonacci numbers