Fibonacci number
Encyclopedia : F : FI : FIB : Fibonacci number
In mathematics, the Fibonacci numbers, named after Leonardo of Pisa, known as Fibonacci, form a sequence defined recursively by:
- [ F_n := F(n):= \begin 0 & \mbox n = 0; \\ 1 & \mbox n = 1; \\ F(n-1)+F(n-2) & \mbox n > 1. \\ \end ]
- 1 Origins
- 2 The bee ancestry code
- 3 Relation to the golden ratio
- 4 Matrix form
- 5 Computation
- 6 Applications
- 7 Fibonacci numbers in nature
- 8 Identities
- 9 Power series
- 10 Reciprocal sums
- 11 Generalizations
- 12
- 13 Fibonacci strings
- 14 Popular culture
- 15 See also
- 16 Journals
- 17 References
- 18 External links
Origins
The "Fibonacci" numbers first appear, under the name maatraameru (mountain of cadence), in the work of the Sanskrit grammarian Pingala (Chhandah-shāstra, the Art of Prosody, 450 or 200 BC). The Indian mathematician Virahanka gave explicit rules for the Fibonacci sequence in the 8th century. The Indian Jain philosopher Hemachandra (c.1150) (and also Gopala) revisited the problem in some detail. Sanskrit vowel sounds can be long (L) or short (S), and Hemachandra wished to compute how many cadences of a given overall length can be composed of these. If the long syllable is twice as long as the short, the solutions are:
- 1 mora: S (1 pattern)
- 2 morae: SS; L (2)
- 3 morae: SSS, SL; LS (3)
- 4 morae: SSSS, SSL, SLS; LSS, LL (5)
- 5 morae: SSSSS, SSSL, SSLS, SLSS, SLL; LSSS, LSL, LLS (8)
In the West, the sequence was first studied by Leonardo of Pisa, known as Fibonacci (1202). He considers the growth of an idealised (biologically unrealistic) rabbit population, assuming that:
- in the first month there is just one newly-born pair,
- new-born pairs become fertile from their second month on
- each month every fertile pair begets a new pair, and
- the rabbits never die
The bee ancestry code
Fibonacci is also stated as having described the sequence "encoded in the ancestry of a male bee." This turns out to be the Fibonacci sequence. One can derive this truth by taking the following facts:
- If an egg is laid by a single female, it hatches a male.
- If, however, the egg is fertilized by a male, it hatches a female.
- Thus, a male bee will always have one parent, and a female bee will have two.
However, this statement is mostly theoretical. In reality, some ancestors of a particular bee will always be sisters or brothers, thus breaking the lineage of distinct parents.
Relation to the golden ratio
The golden ratio [\varphi] (phi), is defined as the ratio that results when a line is divided so that the whole line has the same ratio to the larger segment as the larger segment has to the smaller segment. Expressed mathematically, normalising the larger part to unit length, it is the positive solution of the equation:
- [\frac=\frac] or equivalently [x^2-x-1=0,\,]
Closed form expression
Like every sequence defined by linear recursion, the Fibonacci numbers have a closed-form solution. It has become known as Binet's formula:
- [F\left(n\right) = ], where [\varphi] is the golden ratio defined above.
- [F(n+2)-F(n+1)-F(n)=0.\,]
- [x^2-x-1=0,\,]
Proof (by induction):
Any root of the equation above satifies [x^2=x+1,\,] and multiplying by [x^\,] shows:
- [x^ = x^n + x^\,]
[\varphi^ \,] = [\varphi^n + \varphi^\,] and [(1-\varphi)^\,] = [(1-\varphi)^n + (1-\varphi)^\,] Now consider the functions:
- [F_(n) = a\varphi^n+b(1-\varphi)^n] defined for any real [a,b\,]
Selecting [a=1/\sqrt 5] and [b=-1/\sqrt 5] gives the formula of Binet we started with. It has been shown that this formula satisfies the Fibonacci recursion. Furthermore:[F_(n+1)\,] [ = a\varphi^+b(1-\varphi)^] [=a(\varphi^+\varphi^)+b((1-\varphi)^+(1-\varphi)^)] [=a+b(1-\varphi)^}+a+b(1-\varphi)^}] [=F_(n)+F_(n-1)\,] - [F_(0)=\frac-\frac=0\,\!]
- [F_(1)=\frac-\frac=\frac=\frac=1,]
- [F(n)=] for all n.
In fact, since [|1-\varphi|^n/\sqrt 5 < 1/2] for all [n>0\,\!], [F(n)\,\!] is the closest integer to [\varphi^n/\sqrt 5]. For computational purposes, this is expressed using the floor function,
- [F(n)=\bigg\lfloor\frac + \frac\bigg\rfloor.]
Limit of consecutive quotients
As was pointed out by Johannes Kepler, the ratio of consecutive Fibonacci numbers, that is:
- [\frac\,]converges to the golden ratio [\varphi] (phi)
Proof:
It follows from the explicit formula that for any real [a \ne 0, b \ne 0]:
[\lim_\frac(n+1)}(n)}] [=\lim_\frac-b(1-\varphi)^}] [=\lim_\frac)^n})^n}] [ = \varphi], because, as is easily shown, [\left |}\right | < 1] and thus [\lim_\left(\frac\right)^n=0]
Matrix form
A 2-dimensional system of linear difference equations that describes the Fibonacci sequence is
- [ \choose F_} = \begin 1 & 1 \\ 1 & 0 \end \choose F_}]
- [\vec F_ = A \vec F_.\,]
Note that this matrix has a determinant of −1, and thus it is a 2×2 unimodular matrix. This property can be understood in terms of the continued fraction representation for the golden mean: [\varphi\,\!] = [1; 1, 1, 1, 1, …]. The Fibonacci numbers occur as the ratio of successive convergents of the continued fraction for [\varphi\,\!], and the matrix formed from successive convergents of any continued fraction has a determinant of +1 or −1.
The matrix representation gives the following closed expression for the Fibonacci numbers:
- [\begin 1 & 1 \\ 1 & 0 \end^n = \begin F_ & F_n \\ F_n & F_ \end.]
- [ F_F_ - F_n^2 = (-1)^n.\,]
- [^2 + }^2 = F_,\,]
- [F_F_ + F_n F_ = F_.\, ]
Computation
Several algorithms exist for computing Fibonacci numbers, and these are commonly used as examples in introductory computer science courses for explaining recursion or as examples of exponential vs. polynomial time complexity.Donald Knuth (1997). The Art of Computer Programming, Volume 1: Fundamental Algorithms, Third Edition. Addison-Wesley. Section 1.2.8: Fibonacci Numbers, pp.79–86.Harold Abelson and Gerald Jay Sussman, with Julie Sussman (1996). Structure and Interpretation of Computer Programs, Second Edition. MIT Press. [Section 1.2.2: Tree Recursion].
The most straightforward algorithm mirrors the recursive definition of the sequence. In pseudocode:
function fib(n) if n = 0 return 0 if n = 1 return 1 return fib(n-1) + fib(n-2)
This algorithm runs in O(Fn) = O(φn), i.e. exponential time (and O(n) linear space) — thus, it is extremely inefficient for calculating large Fibonacci numbers. It can be brought down to linear time by using memoization in the algorithm.A more efficient iterative algorithm 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. This runs in O(n) time and O(1) (constant) space:
function fib(n) var a,b := 0,1 repeat n times a,b := b,a+b return a
A logarithmic time algorithm can be derived from the matrix form:Lloyd Allison, [Binary Recursion]function fib(n): var a,b = fibpair(n) return b
function fibpair(n): if n=1 return (0,1) else var a,b = fibpair(n/2) var c = a*a + b*b var d = b*(b+2*a) if even(n) return (c,d) else return (d,c+d)
Note that, in every case, complexity is given in terms of the value n of the input. If we measure it in terms of the size of the input, which is m = log2 n bits in the case of an integer n in binary representation, then the complexity of the naïve recursive algorithm becomes O[(\varphi^)], of the second algorithm O(2m), and of the final algorithm O(m).Since a closed formula exists, the practical use of these algorithms is limited to cases where exact values of Fn are needed for large n. When computing using the closed form, rounding errors will inevitably occur and grow as n becomes larger, because φ, being irrational, must be represented by a floating point number. Note that with standard IEEE 64 bit floats, results will not be precise already at n = 75. An implementation using 32 bit integers will run into an overflow situation before that.
Applications
The Fibonacci numbers are important in the run-time analysis of Euclid's algorithm to determine the greatest common divisor of two integers: the worst case input for this algorithm is a pair of consecutive Fibonacci numbers.
Yuri 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).
Every positive integer can be written in a unique way as the sum of one or more distinct Fibonacci numbers in such a way that the sum does not include any two consecutive Fibonacci numbers. This is known as Zeckendorf's theorem, and a sum of Fibonacci numbers that satisfies these conditions is called a Zeckendorf representation.
Fibonacci numbers are also used by some pseudorandom number generators.
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. In addition, the syllables of the lyrics of parts of the Tool song Lateralus follow the Fibonacci sequence in each line, for instance "Black/Then/White are/All I see/In my infancy/Red and yellow then came to be".
Since the conversion factor 1.609 for miles to kilometers is close to the golden mean φ, the decomposition of distance in miles into a sum of Fibonacci numbers becomes nearly the kilometer sum when the Fibonacci numbers are replaced by their successors. This method amounts to a radix 2 number register in base φ being shifted. To go from kilometers to miles shift the register down the Fibonacci sequence instead.
Fibonacci numbers in nature
Sunflower head displaying florets in spirals of 34 and 55 around the outsideFibonacci sequences have been noted to appear in biological settings, such as the branching patterns of leaves in grasses and flowers, branching in bushes and trees, the arrangement of pines on a pine cone, seeds on a raspberry, and spiral patterns in horns and shells (see phyllotaxis). The scales on the surface of a pineapple are arranged in two interlocking spirals, eight spirals in one direction, thirteen in the other; each being a Fibonacci number. Przemyslaw Prusinkiewicz has advanced the idea that these can be in part understood as the expression of certain algebraic constraints on free groups, specifically as certain Lindenmayer grammars.
Generally one sees Fibonacci numbers arise in the study of the fractal Fuchsian groups and Kleinian groups, and systems that possess such symmetries. For example, the solutions to reaction-diffusion differential equations (such as that seen in the Belousov-Zhabotinsky reaction) can show such a patterning; in biology, genes often express themselves through gene regulatory networks, that is, in terms of several enzymes controlling a reaction, which can be modelled with reaction-diffusion equations. Such systems rarely give the Fibonacci sequence exactly or directly; rather, the relationship occurs deeper in the theory. Similar patterns also occur in non-biological systems, such as in sphere packing models.
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 established in two stages. First, we count the number of ways summing 1s and 2s 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)
Common factors
Any two consecutive Fibonacci numbers are relatively prime. Suppose that Fn and Fn+1 have a common factor g. Then Fn−1 = Fn+1 – Fn must also be a multiple of g; and by induction the same must be true of all lower Fibonacci numbers. But F1 = 1, so g = 1.
Other identities include relationships to the Lucas numbers, which have the same recursive properties but start with L0=2 and L1=1. These properties include F2n=FnLn
Power series
The Fibonacci power series- [s(x)=\sum_^\infty F(n) x^n]
- [s(x)=\frac.]
- [s(x) = F_0 + F_1x + F_2x^2 + \cdots = \sum_^ F_k x^k]
[s(x)\,\!] [= F_0 + F_1x + \sum_^ \left( F_ + F_ \right) x^k] [= x + \sum_^\infty F_ x^k + \sum_^\infty F_ x^k] [= x + x \sum_^\infty F_ x^ + x^2 \sum_^\infty F_ x^] [= x + x \sum_^\infty F_j x^j + x^2 \sum_^\infty F_m x^m] [= x + x \left( \sum_^\infty F_j x^j - F_0 \right) + x^2 s(x)] [= x + x s(x) + x^2 s(x). \,\!] Therefore,
- [s(x) = \frac.]
- [s+\frac = 1 + \sum_^\infty (F(n)+F(n+1)) x^n]
Reciprocal sums
Infinite sums over reciprocal Fibonacci numbers can sometimes be evaluated in terms of theta functions. For instance, it can be shown that
- [\sum_^\infty \frac + F_n} = \frac}.]
- [C = \sum_^ \frac = 3.359885 \dots]
Generalizations
Vector space
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.Similar integer sequences
Lucas numbers
In particular, the Fibonacci sequence L with L(1) = 1 and L(2) = 3 is referred to as the Lucas numbers, after Edouard Lucas. This sequence was described by Leonhard Euler in 1748, in the Introductio in Analysin Infinitorum. The significance in the Lucas numbers L(n) lies in the fact that raising the golden ratio to the nth power yields- [\left( \frac 1 2 \left( 1 + \sqrt \right) \right)^n = \frac 1 2 \left( L(n) + F(n) \sqrt \right). ]
- [L\left(n\right)=F\left(n-1\right)+F\left(n+1\right).\,]
- U(0) = 0
- U(1) = 1
- U(n + 2) = PU(n + 1) − QU(n)
The Padovan sequence is generated by the recurrence P(n) = P(n − 2) + P(n − 3).
Tribonacci numbers
The tribonacci numbers are like the Fibonacci numbers, but instead of starting with two predetermined terms, the sequence starts with three predetermined terms and each term afterwards is the sum of the preceding three terms. The first few tribonacci numbers are :- 0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, 1705, 3136, 5768, 10609, 19513, 35890, 66012, …
Tetranacci numbers
The tetranacci numbers start with four predetermined terms, each term afterwards being the sum of the preceding four terms. The first few tetranacci numbers are :- 0, 0, 0, 1, 1, 2, 4, 8, 15, 29, 56, 108, 208, 401, 773, 1490, 2872, 5536, 10671, 20569, 39648, 76424, 147312, 283953, 547337, …
Other -anacci numbers
Pentanacci, hexanacci and heptanacci numbers have been computed, but they have not interested researchers much.Other generalizations
The Fibonacci polynomials are another generalization of Fibonacci numbers.A random Fibonacci sequence can be defined by tossing a coin for each position n of the sequence and taking F(n)=F(n−1)+F(n−2) if it lands heads and F(n)=F(n−1)−F(n−2) if it lands tails. Work by Furstenburg and Kesten guarantees that this sequence almost surely grows exponentially at a constant rate: the constant is independent of the coin tosses and was computed in 1999 by Divakar Viswanath. It is now known as Viswanath's constant.
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, …
- S(n) = S(0)F(n−1) + S(1)F(n)
The first few Fibonacci numbers that are also prime numbers are : 2, 3, 5, 13, 89, 233, 1597, 28657, 514229, …. It is not known if there are infinitely many Fibonacci primes.
Fibonacci strings
In analogy to its numerical counterpart, a Fibonacci string is defined by:
- [ F_n := F(n):= \begin b & \mbox n = 0; \\ a & \mbox n = 1; \\ F(n-1)+F(n-2) & \mbox n > 1. \\ \end ],
- b, a, ab, aba, abaab, abaababa, abaababaabaab, …
Fibonacci strings appear as inputs for the worst case in some computer algorithms.
Popular culture
- The sequence is used in The Wright 3 by Blue Balliett.
- The Fibonacci sequence plays a small part in the bestselling novel and film The Da Vinci Code
- A part of the Fibonacci sequence is used as a code in Matthew Reilly's Ice Station.
- Tool's song "Lateralus" from the album of the same name features the Fibonacci sequence symbolically in the verses of the song. The syllables in the first verse count 1, 1, 2, 3, 5, 8, 5, 3, 13, 8, 5, 3. Similarly, on Tool's 10,000 Days album there has already been speculation to more Fibonacci references embedded within the album.
- Marilyn Manson is another artist who has employed the Fibonacci sequence. He uses the sequence overtly in a watercolor painting entitled "Fibonacci" during his Holy Wood era, which it should be noted, uses bees as focal points. More discreetly, Manson used the sequence in the interior album art of Antichrist Superstar in his depiction of "The Vitruvian Man", in the vein of Leonardo DaVinci's work which was also based on the sequence. There is also [speculation] that some of the beats in the songs on the album Holy Wood (In the Shadow of the Valley of Death) are based on the Fibonacci sequence as well.
- Along with the concepts of the golden rectangle and golden spiral, the Fibonacci sequence is used in Darren Aronofsky's indie film π (1998)
- Referenced in the film of The Phantom Tollbooth.
- Used in Steven Spielberg's miniseries Taken.
- It was also used as a key plot point in an episode of the Disney original television series So Weird.
- In a FoxTrot comic, Jason and Marcus are playing football. Jason yells, "Hut 0! Hut 1! Hut 1! Hut 2!" all the way until "Hut 13!" in the Fibonacci sequence. Marcus yells, "Is it the Fibonacci sequence?" Jason says, "Correct! Touchdown, Marcus!"
- BT (Brian Transeau) released a dance track in 2000, entitled the "Fibonacci Sequence," which features a sample of a reading of the sequence.
- Dr. Steel released a song titled "Fibonacci Sequence" in 2005.
- The Fibonacci Sequence is a key plot point in the television show MathNet's episode 'The Case of the Willing Parrot'.
- It is also referenced to in Numb3rs, the television series. Many times the cast reference the fibonacci sequence and the relationship it has with nature to further emphasise the wonders of math.
- Fib Poetry has been popularized by Gregory K. Pincus [on his blog, Gottabook]. A report in the New York Times [here] and [here], as well on [Slashdot].
- Mario Merz frequently uses the Fibonacci sequence in his art work
- MC Paul Barman structured the rhymes in his song "Enter Pan-Man" according to the Fibonacci sequence. [link]
- Referenced in the film Dopo Mezzanotte (After Midnight) where the sequence appears as neon numbers on the dome of Il Mole in Turin and is also used to select numbers in a lottery, ultimately winning it.
See also
- Fibonacci number program
- Anti-Fibonacci numbers
- Golden ratio (or golden section)
- Plastic number
- Padovan number
- Perrin number
Journals
- [The Fibonacci Quarterly] — an academic journal devoted to the study of Fibonacci numbers
References
External links
- Alexey Stakhov, [Museum of Harmony and Golden Section], (undated, 2005 or earlier).
- Subhash Kak, [The Golden Mean and the Physics of Aesthetics], Archive of Physics, (2004).
- Ron Knott, [The Golden Section: Phi], (2005).
- Ron Knott, [Representations of Integers using Fibonacci numbers], (2004).
- Bob Johnson, [Fibonacci resources], (2004)
- Donald E. Simanek, [Fibonacci Flim-Flam], (undated, 2005 or earlier).
- Rachel Hall, [Hemachandra's application to Sanskrit poetry], (undated; 2005 or earlier).
- Schweizer, David. [The Fibonacci Numbers], (1996).
- Alex Vinokur, [Computing Fibonacci numbers on a Turing Machine], (2003).
- (no author given), [Fibonacci Numbers Information], (undated, 2005 or earlier).
- [Fibonacci resources site]
- [Fibonacci Numbers and the Golden Section] - Ron Knott's Surrey University multimedia web site on the Fibonacci numbers, the Golden section and the Golden string.
- The [Fibonacci Association] incorporated in 1963, focuses on Fibonacci numbers and related mathematics, emphasizing new results, research proposals, challenging problems, and new proofs of old ideas.
- Dawson Merrill's [Fib-Phi] link page.
- [Fibonacci primes]
- [The One Millionth Fibonacci Number]
- [Math for Poets and Drummers] - Rachael Hall surveys rhythm and Fibonacci numbers and also the Hemachandra connection. Saint Joseph's University, 2005.
- [Source code for calculating the Fibonacci sequence] in many programming languages.
- [Actionscript 2.0 Fibonacci sequence generator class]
- [Fibonacci Calculator] and [Pre-caculated Fibonacci levels] - examples of how Fibonacci's work is used every day in the futures markets.
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
