Mathematics . The Fibonacci numbers occur as the sums of
binomial coefficients in the "shallow" diagonals of
Pascal's triangle: F_n = \sum_{k=0}^{\left\lfloor\frac{n-1}{2}\right\rfloor} \binom{n-k-1}{k}. This can be proved by expanding the generating function \frac{x}{1-x-x^2} = x + x^2(1+x) + x^3(1+x)^2 + \dots + x^{k+1}(1+x)^k + \dots = \sum\limits_{n=0}^\infty F_n x^n and collecting like terms of x^n. To see how the formula is used, we can arrange the sums by the number of terms present: : which is \textstyle \binom{5}{0}+\binom{4}{1}+\binom{3}{2}, where we are choosing the positions of twos from terms. These numbers also give the solution to certain enumerative problems, the most common of which is that of counting the number of ways of writing a given number as an ordered sum of 1s and 2s (called
compositions); there are ways to do this (equivalently, it's also the number of
domino tilings of the 2\times n rectangle). For example, there are ways one can climb a staircase of 5 steps, taking one or two steps at a time: : The figure shows that 8 can be decomposed into 5 (the number of ways to climb 4 steps, followed by a single-step) plus 3 (the number of ways to climb 3 steps, followed by a double-step). The same reasoning is applied
recursively until a single step, of which there is only one way to climb. The Fibonacci numbers can be found in different ways among the set of
binary strings, or equivalently, among the
subsets of a given set. • The number of binary strings of length without consecutive s is the Fibonacci number . For example, out of the 16 binary strings of length 4, there are without consecutive s—they are , , , , , , , and . Such strings are the binary representations of
Fibbinary numbers. Equivalently, is the number of subsets of without consecutive integers, that is, those for which for every . A
bijection with the sums to is to replace 1 with and 2 with , and drop the last zero. • The number of binary strings of length without an odd number of consecutive s is the Fibonacci number . For example, out of the 16 binary strings of length 4, there are without an odd number of consecutive s—they are , , , , . Equivalently, the number of subsets of without an odd number of consecutive integers is . A bijection with the sums to is to replace 1 with and 2 with . • The number of binary strings of length without an even number of consecutive s or s is . For example, out of the 16 binary strings of length 4, there are without an even number of consecutive s or s—they are , , , , , . There is an equivalent statement about subsets. •
Yuri Matiyasevich was able to show that the Fibonacci numbers can be defined by a
Diophantine equation, which led to
his solving Hilbert's tenth problem. • The Fibonacci numbers are also an example of a
complete sequence. This means that every positive integer can be written as a sum of Fibonacci numbers, where any one number is used once at most. • Moreover, 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. The Zeckendorf representation of a number can be used to derive its
Fibonacci coding. • Starting with 5, every second Fibonacci number is the length of the
hypotenuse of a
right triangle with integer sides, or in other words, the largest number in a
Pythagorean triple, obtained from the formula (F_n F_{n+3})^2 + (2 F_{n+1}F_{n+2})^2 = {F_{2 n+3}}^2. The sequence of Pythagorean triangles obtained from this formula has sides of lengths (3,4,5), (5,12,13), (16,30,34), (39,80,89), ... . The middle side of each of these triangles is the sum of the three sides of the preceding triangle. • The
Fibonacci cube is an
undirected graph with a Fibonacci number of nodes that has been proposed as a
network topology for
parallel computing. • Fibonacci numbers appear in the
ring lemma, used to prove connections between the
circle packing theorem and
conformal maps.
Computer science s green; heights red.The keys in the left spine are Fibonacci numbers. • The Fibonacci numbers are important in
computational 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. • Fibonacci numbers are used in a polyphase version of the
merge sort algorithm in which an unsorted list is divided into two lists whose lengths correspond to sequential Fibonacci numbers—by dividing the list so that the two parts have lengths in the approximate proportion . A tape-drive implementation of the
polyphase merge sort was described in
The Art of Computer Programming. • A Fibonacci tree is a
binary tree whose child trees (recursively) differ in
height by exactly 1. So it is an
AVL tree, and one with the fewest nodes for a given height—the "thinnest" AVL tree. These trees have a number of vertices that is a Fibonacci number minus one, an important fact in the analysis of AVL trees. • Fibonacci numbers are used by some
pseudorandom number generators. • Fibonacci numbers arise in the analysis of the
Fibonacci heap data structure. • A one-dimensional optimization method, called the
Fibonacci search technique, uses Fibonacci numbers. • The Fibonacci number series is used for optional
lossy compression in the
IFF 8SVX audio file format used on
Amiga computers. The number series
compands the original audio wave similar to logarithmic methods such as
μ-law. • Some Agile teams use a modified series called the "Modified Fibonacci Series" in
planning poker, as an estimation tool. Planning Poker is a formal part of the
Scaled Agile Framework. •
Fibonacci coding •
Negafibonacci coding Nature head showing the arrangement in 21 (blue) and 13 (cyan) spirals. Such arrangements involving consecutive Fibonacci numbers appear in a wide variety of plants. Fibonacci sequences appear in biological settings, such as branching in trees,
arrangement of leaves on a stem, the fruitlets of a
pineapple, the flowering of
artichoke, the leaves of the spiral aloe (Aloe polyphylla), the arrangement of a
pine cone, and the family tree of
honeybees.
Kepler pointed out the presence of the Fibonacci sequence in nature, using it to explain the (
golden ratio-related)
pentagonal form of some flowers. Field
daisies most often have petals in counts of Fibonacci numbers. In 1830,
Karl Friedrich Schimper and
Alexander Braun discovered that the
parastichies (spiral
phyllotaxis) of plants were frequently expressed as fractions involving Fibonacci numbers.
Przemysław Prusinkiewicz advanced the idea that real instances can in part be understood as the expression of certain algebraic constraints on
free groups, specifically as certain
Lindenmayer grammars. A model for the pattern of
florets in the head of a
sunflower was proposed by in 1979. This has the form \theta = \frac{2\pi}{\varphi^2} n,\ r = c \sqrt{n} where is the index number of the floret and is a constant scaling factor; the florets thus lie on
Fermat's spiral. The divergence
angle, approximately 137.51°, is the
golden angle, dividing the circle in the golden ratio. Because this ratio is irrational, no floret has a neighbor at exactly the same angle from the center, so the florets pack efficiently. Because the rational approximations to the golden ratio are of the form , the nearest neighbors of floret number are those at for some index , which depends on , the distance from the center. Sunflowers and similar flowers most commonly have spirals of florets in clockwise and counter-clockwise directions in the amount of adjacent Fibonacci numbers, typically counted by the outermost range of radii. Fibonacci numbers also appear in the ancestral pedigrees of
bees (which are
haplodiploids), according to the following rules: • If an egg is laid but not fertilized, it produces a male (or
drone bee in honeybees). • If, however, an egg is fertilized, it produces a female. Thus, a male bee always has one parent, and a female bee has two. If one traces the pedigree of any male bee (1 bee), he has 1 parent (1 bee), 2 grandparents, 3 great-grandparents, 5 great-great-grandparents, and so on. This sequence of numbers of parents is the Fibonacci sequence. The number of ancestors at each level, , is the number of female ancestors, which is , plus the number of male ancestors, which is . This is under the unrealistic assumption that the ancestors at each level are otherwise unrelated. , which he received from his father. The male counts as the "origin" of his own X chromosome (F_1=1), and at his parents' generation, his X chromosome came from a single parent . The male's mother received one X chromosome from her mother (the son's maternal grandmother), and one from her father (the son's maternal grandfather), so two grandparents contributed to the male descendant's X chromosome . The maternal grandfather received his X chromosome from his mother, and the maternal grandmother received X chromosomes from both of her parents, so three great-grandparents contributed to the male descendant's X chromosome . Five great-great-grandparents contributed to the male descendant's X chromosome , etc. (This assumes that all ancestors of a given descendant are independent, but if any genealogy is traced far enough back in time, ancestors begin to appear on multiple lines of the genealogy, until eventually a
population founder appears on all lines of the genealogy.)
Other • In
optics, when a beam of light shines at an angle through two stacked transparent plates of different materials of different
refractive indexes, it may reflect off three surfaces: the top, middle, and bottom surfaces of the two plates. The number of different beam paths that have reflections, for , is the -th Fibonacci number. (However, when , there are three reflection paths, not two, one for each of the three surfaces.) •
Fibonacci retracement levels are widely used in
technical analysis for financial market trading. • Since the
conversion factor 1.609344 for miles to kilometers is close to the golden ratio, 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
golden ratio base being shifted. To convert from kilometers to miles, shift the register down the Fibonacci sequence instead. • The measured values of voltages and currents in the infinite resistor chain circuit (also called the
resistor ladder or infinite series-parallel circuit) follow the Fibonacci sequence. The intermediate results of adding the alternating series and parallel resistances yields fractions composed of consecutive Fibonacci numbers. The equivalent resistance of the entire circuit equals the golden ratio. • Brasch et al. 2012 show how a generalized Fibonacci sequence also can be connected to the field of
economics. == See also ==