Francais | English | Espanõl

Fibonacci number

From Wikipedia, the free encyclopedia

(Redirected from Fibonacci sequence)
Jump to: navigation, search

In mathematics, the Fibonacci numbers form a sequence defined recursively by:

<math>
 F(n):=
 \begin{cases}
   0             & \mbox{if } n = 0; \\
   1             & \mbox{if } n = 1; \\
   F(n-1)+F(n-2) & \mbox{if } n > 1. \\


  \end{cases}
</math>

That is, after two starting values, each number is the sum of the two preceding numbers. The first Fibonacci numbers (sequence A000045 in OEIS), also denoted as Fn, for n = 0, 1, … , are:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657.

Sometimes a definition is seen, starting the sequence at F1 = 1, but it is more common to include F0 = 0.

The Fibonacci numbers are named after Leonardo of Pisa, known as Fibonacci, although they had been described earlier in India.<ref>Parmanand Singh. Acharya Hemachandra and the (so called) Fibonacci Numbers. Math . Ed. Siwan , 20(1):28-30,1986.ISSN 0047-6269]</ref><ref>Parmanand Singh,"The So-called Fibonacci numbers in ancient and medieval India. Historia Mathematica v12 n3, 229-244,1985</ref>

Contents

[edit] 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). Prosody was important in ancient Indian ritual because of an emphasis on the purity of utterance. The Indian mathematician Virahanka (6th century AD) showed how the Fibonacci sequence arose in the analysis of metres with long and short syllables. Subsequently, the Jain philosopher Hemachandra (c.1150) composed a well known text on these. A commentary on Virahanka by Gopala in the 12th c. also revisits the problem in some detail.

Sanskrit vowel sounds can be long (L) or short (S), and Virahanka's analysis, which came to be known as mAtrA-vritta wishes to compute how many metres (mAtrAs) of a given overall length can be composed of these syllables. 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)

A pattern of length n can be formed by adding S to a pattern of length n−1, or L to a pattern of length n−2; and the prosodicists showed that the number of patterns of length n is the sum of the two previous numbers in the series. Donald Knuth reviews this work in The Art of Computer Programming as equivalent formulations of the bin packing problem for items of lengths 1 and 2.

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

Let the population at month n be F(n). At this time, only rabbits who were alive at month n−2 are fertile and produce offspring, so F(n−2) pairs are added to the current population of F(n−1). Thus the total is F(n) = F(n−1) + F(n−2).<ref>Knott, Ron. Fibonacci's Rabbits. University of Surrey School of Electronics and Physical Sciences.</ref>

[edit] The bee ancestry code

Fibonacci numbers also appear in the description of the reproduction of a population of idealized bees, according to the following rules:

  • 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.

If one traces the ancestry of this male bee (1 bee), he has 1 female parent (1 bee). This female had 2 parents, a male and a female (2 bees). The female had two parents, a male and a female, and the male had one female (3 bees). Those two females each had two parents, and the male had one (5 bees). If one continues this sequence, it gives a perfectly accurate depiction of the Fibonacci sequence.

Notice that this is a mathematical statement, it does not describe actual bee ancestries. In reality, some ancestors of a particular bee will always be sisters or brothers, thus breaking the lineage of distinct parents.

[edit] Relation to the golden ratio

The golden ratio.

The golden ratio <math>\varphi</math> (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:

<math>\frac{x}{1}=\frac{1}{x-1}</math> or equivalently <math>x^2-x-1=0,\,</math>

which is equal to <math>\varphi = \frac{(1 + \sqrt{5})}{2}\approx 1.618\,033\,989\,.</math>

[edit] 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:

<math>F\left(n\right) = {{\varphi^n-(1-\varphi)^n} \over {\sqrt 5}}\, ,</math> where <math>\varphi</math> is the golden ratio defined above.

Note the similarity of the Fibonacci recursion

<math>F(n+2)-F(n+1)-F(n)=0\,</math>

to the defining equation of the golden ratio in the form

<math>x^2-x-1=0,\,</math>

also known as the generating polynomial of the recursion.

Proof (by induction):

Any root of the equation above satifies <math>\begin{matrix}x^2=x+1,\end{matrix}\,</math> and multiplying by <math>x^{n-1}\,</math> shows:

<math>x^{n+1} = x^n + x^{n-1}\,</math>

By definition <math>\varphi</math> is a root of the equation, and the other root is <math>1-\varphi\, .</math>. Therefore:

<math>\varphi^{n+1} = \varphi^n + \varphi^{n-1}\, </math>

and

<math>(1-\varphi)^{n+1}\,</math> <math> = (1-\varphi)^n + (1-\varphi)^{n-1}\, .</math>

Now consider the functions:

<math>F_{a,b}(n) = a\varphi^n+b(1-\varphi)^n</math> defined for any real <math>a,b\, .</math>

All these functions satisfy the Fibonacci recursion

<math>\begin{align}
 F_{a,b}(n+1) &= a\varphi^{n+1}+b(1-\varphi)^{n+1} \\
              &=a(\varphi^{n}+\varphi^{n-1})+b((1-\varphi)^{n}+(1-\varphi)^{n-1}) \\
              &=a{\varphi^{n}+b(1-\varphi)^{n}}+a{\varphi^{n-1}+b(1-\varphi)^{n-1}} \\
              &=F_{a,b}(n)+F_{a,b}(n-1)

\end{align}</math> Selecting <math>a=1/\sqrt 5</math> and <math>b=-1/\sqrt 5</math> gives the formula of Binet we started with. It has been shown that this formula satisfies the Fibonacci recursion. Furthermore:

<math>F_{a,b}(0)=\frac{1}{\sqrt 5}-\frac{1}{\sqrt 5}=0\,\!</math>

and

<math>F_{a,b}(1)=\frac{\varphi}{\sqrt 5}-\frac{(1-\varphi)}{\sqrt 5}=\frac{-1+2\varphi}{\sqrt 5}=\frac{-1+(1+\sqrt 5)}{\sqrt 5}=1,</math>

establishing the base cases of the induction, proving that

<math>F(n)={{\varphi^n-(1-\varphi)^n} \over {\sqrt 5}}</math> for all <math> n\, .</math>

For any two starting values, a combination <math>a,b</math> can be found such that the function <math>F_{a,b}(n)\,</math> is the exact closed formula for the series.

Since <math>\begin{matrix}|1-\varphi|^n/\sqrt 5 < 1/2\end{matrix}</math> for all <math>n\geq 0\, , F(n)\, </math> is the closest integer to <math>\varphi^n/\sqrt 5\, .</math> For computational purposes, this is expressed using the floor function:

<math>F(n)=\bigg\lfloor\frac{\varphi^n}{\sqrt 5} + \frac{1}{2}\bigg\rfloor.</math>

[edit] Limit of consecutive quotients

Johannes Kepler pointed out that the ratio of consecutive Fibonacci numbers

<math>\frac{F(n+1)}{F(n)}\,</math>

converges to the golden ratio <math>\varphi</math> as the limit. This convergence does not depend on the starting values chosen, excluding 0, 0.

Proof:

It follows from the explicit formula that for any real <math>a \ne 0, b \ne 0</math>:

<math>\begin{align}
 \lim_{n\to\infty}\frac{F_{a,b}(n+1)}{F_{a,b}(n)}
    &= \lim_{n\to\infty}\frac{a\varphi^{n+1}-b(1-\varphi)^{n+1}}{a\varphi^n-b(1-\varphi)^n} \\
    &= \lim_{n\to\infty}\frac{a\varphi-b(1-\varphi)(\frac{1-\varphi}{\varphi})^n}{a-b(\frac{1-\varphi}{\varphi})^n} \\
    &= \varphi
\end{align}</math>

because <math>\bigl|{\tfrac{1-\varphi}{\varphi}}\bigr| < 1</math> and thus <math>\lim_{n\to\infty}\left(\tfrac{1-\varphi}{\varphi}\right)^n=0</math>

[edit] Matrix form

A 2-dimensional system of linear difference equations that describes the Fibonacci sequence is

<math>{F_{k+2} \choose F_{k+1}} = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} {F_{k+1} \choose F_{k}}</math>

or

<math>\vec F_{k+1} = A \vec F_{k}.\,</math>

The eigenvalues of the matrix A are <math>\varphi\,\!</math> and <math>(1-\varphi)\,\!</math>, and the elements of the eigenvectors of A, <math>{\varphi \choose 1}</math> and <math>{1 \choose -\varphi}</math>, are in the ratios <math>\varphi\,\!</math> and <math>(1-\varphi\,\!)</math>.

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: <math>\varphi\,\!</math> = [1; 1, 1, 1, 1, …]. The Fibonacci numbers occur as the ratio of successive convergents of the continued fraction for <math>\varphi\,\!</math>, 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:

<math>\begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}^n =
      \begin{pmatrix} F_{n+1} & F_n \\
                      F_n     & F_{n-1} \end{pmatrix}.

</math>

Taking the determinant of both sides of this equation yields the identity

<math> F_{n+1}F_{n-1} - F_n^2 = (-1)^n.\,</math>

Additionally, since <math> A^n A^m=A^{m+n}</math> for any square matrix <math>A</math>, the following identities can be derived:

<math>{F_n}^2 + {F_{n-1}}^2 = F_{2n-1},\,</math>
<math>F_{n+1}F_{m} + F_n F_{m-1} = F_{m+n}.\, </math>

[edit] 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 the sums of diagonals in Pascal's triangle and Lozanić'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 used by some pseudorandom number generators.

A one-dimensional optimization method, called the Fibonacci search technique, uses Fibonacci numbers <ref>M. Avriel and D.J. Wilde (1966). "Optimality of the Symmetric Fibonacci Search Technique". The Fibonacci Quarterly (3): 265—269.</ref>.

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.

Since the conversion factor 1.609 for miles to kilometers is close to the golden ratio (denoted φ), 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!

[edit] Fibonacci numbers in nature

Image:Helianthus whorl.jpg Fibonacci sequences appear in biological settings,<ref>S. Douady and Y. Couder (1996). "Phyllotaxis as a Dynamical Self Organizing Process". Journal of Theoretical Biology (178): 255–274.</ref> such as branching in trees, the curve of waves[citation needed], the fruitlets of a pineapple, and the arrangement of a pine cone<ref>A. Brousseau (1969). "Fibonacci Statistics in Conifers". The Fibonacci Quarterly (7): 525—532.</ref>. Przemyslaw Prusinkiewicz 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.<ref>Prusinkiewicz, Przemyslaw, James Hanan (1989). Lindenmayer Systems, Fractals, and Plants (Lecture Notes in Biomathematics). Springer-Verlag. ISBN 0-387-97092-4.</ref>

[edit] Identities

  1. F(n + 1) = F(n) + F(n − 1)
  2. F(0) + F(1) + F(2) + … + F(n) = F(n + 2) − 1
  3. F(1) + 2 F(2) + 3 F(3) + … + n F(n) = n F(n + 2) − F(n + 3) + 2
  4. F(0)2 + F(1)2 + F(2)2 + … + F(n)2 = F(n) F(n + 1)

These identities can be proven using many different methods. But, among all, we wish to present an elegant proof for each of them using combinatorial arguments here. In particular, F(n) can be interpreted as the number of ways summing 1's and 2's to n − 1, with the convention that F(0) = 0, meaning no sum will add up to −1, and that F(1) = 1, meaning the empty sum will "add up" to 0. Here the order of the summands matters. For example, 1 + 2 and 2 + 1 are considered two different sums and are counted twice.

[edit] 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.

[edit] 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.

[edit] 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).

On the other hand, we observe from the second identity that there are

  • 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.

Adding up all n + 1 sums, we see that there are

  • (n + 1) F(0) + n F(1) + … + F(n) ways summing to −1, 0, …, or n + 1.

Since the two methods of counting refer to the same number, we have

(n + 1) F(0) + n F(1) + … + F(n) = F(n + 2) + F(n + 3) − (n + 2)

Finally, we complete the proof by subtracting the above identity from n + 1 times the second identity.

[edit] 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+1Fn 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

[edit] Identity for doubling n

Another identity useful for calculating Fn for large values of n is

<math>F_{2n+k} = F_k F_{n+1}^2 + 2 F_{k-1} F_{n+1} F_n + F_{k-2} F_n^2 </math>

for all integers n and k.

[edit] Power series

The Fibonacci power series

<math>s(x)=\sum_{n=1}^\infty F(n) x^n</math>

has a simple and interesting closed-form solution for x < 1/φ:

<math>s(x)=\frac{x}{1-x-x^2}.</math>

This function is therefore the generating function of the Fibonacci sequence. It can be proven as follows:

<math>s(x) = F_0 + F_1x + F_2x^2 + \cdots = \sum_{k=0}^{\infty} F_k x^k</math>

Substituting <math>F_k = F_{k-1} + F_{k-2}</math>:

<math>\begin{align}
 s(x) &= F_0 + F_1x + \sum_{k=2}^{\infty} \left( F_{k-1} + F_{k-2} \right) x^k \\
      &= x + \sum_{k=2}^\infty F_{k-1} x^k + \sum_{k=2}^\infty F_{k-2} x^k \\
      &= x + x \sum_{k=2}^\infty F_{k-1} x^{k-1} + x^2 \sum_{k=2}^\infty F_{k-2} x^{k-2} \\
      &= x + x \sum_{j=1}^\infty F_j x^j + x^2 \sum_{m=0}^\infty F_m x^m \\
      &= x + x \biggl( \sum_{j=0}^\infty F_j x^j - F_0 \biggr) + x^2 s(x) \\
      &= x + x s(x) + x^2 s(x)
 \end{align}</math>

Therefore,

<math>s(x) = \frac{x}{1 - x - x^2}.</math>

In particular, math puzzle-books note the curious value <math>\frac{s(\frac{1}{10})}{10}=\frac{1}{89}</math>. The sum is easily proved by noting that

<math>s+\frac{s}{x} = 1 + \sum_{n=1}^\infty \bigl(F(n)+F(n+1)\bigr) x^n</math>

and then explicitly evaluating the sum.

[edit] Reciprocal sums

Infinite sums over reciprocal Fibonacci numbers can sometimes be evaluated in terms of theta functions. For example, we can write the sum of every odd-indexed Fibonacci number as

<math>\sum_{k=0}^\infty \frac{1}{F_{2k+1}} = \frac{\sqrt{5}}{4}\vartheta_2^2 \left(0, \frac{3-\sqrt 5}{2}\right) ,</math>

and the sum of squared reciprocal Fibonacci numbers as

<math>\sum_{k=1}^\infty \frac{1}{F_k^2} = \frac{5}{24} \left(\vartheta_2^4\left(0, \frac{3-\sqrt 5}{2}\right) - \vartheta_4^4\left(0, \frac{3-\sqrt 5}{2}\right) + 1 \right).</math>

If we add 1 to each Fibonacci number in the first sum, there is also the closed form

<math>\sum_{k=0}^\infty \frac{1}{1+F_{2k+1}} = \frac{\sqrt{5}}{2},</math>

and there is a nice nested sum of squared Fibonacci numbers giving the reciprocal of the golden ratio,

<math>\sum_{k=1}^\infty \frac{(-1)^{k+1}}{\sum_{j=1}^k {F_{j}}^2} = \frac{\sqrt{5}-1}{2}.</math>

Results such as these make it plausible that a closed formula for the plain sum of reciprocal Fibonacci numbers could be found, but none is yet known. Despite that, the reciprocal Fibonacci constant

<math>C = \sum_{k=1}^{\infty} \frac{1}{F_k} = 3.359885666243 \dots</math>

has been proved irrational by Richard André-Jeannin.

[edit] Generalizations

The Fibonacci sequence has been generalized in many ways. These include:

  • Extending to negative index n, still satisfying Fn = Fn-1 + Fn-2.
  • Starting with other integers. Lucas numbers have L1 = 1, L2 = 3, and Ln = Ln-1 + Ln-2.
  • Letting a number be a linear function (other than the sum) of the 2 preceding numbers.
  • Not adding the immediately preceding numbers. The Padovan sequence has P(n) = P(n - 2) + P(n - 3).
  • Generating the next number by adding 3 numbers (tribonacci numbers), 4 numbers (tetranacci numbers), or more.
  • Adding other objects than integers, for example functions or strings.

[edit] Fibonacci primes

Main article: Fibonacci prime

A Fibonacci prime is a Fibonacci number that is prime. The first few are A005478:

2, 3, 5, 13, 89, 233, 1597, 28657, 514229, …

Fibonacci primes with thousands of digits have been found, but it is not known whether there are infinitely many. They must all have a prime index, except F4 = 3.

[edit] Popular culture

The Fibonacci sequence is easy to understand for non-mathematicians, contributing to the Fibonacci numbers being embraced by popular culture. They appear in novels (e.g. The Da Vinci Code which is also a film), films (e.g. Darren Aronofsky's π), and in various television shows (e.g. NUMB3RS).

In addition to just mentioning Fibonacci numbers, they have also been applied to create architecture, visual art works, poetry, and music; sometimes through their relation to the golden ratio.

[edit] See also

[edit] References

<references/>

[edit] External links

bg:Число на Фибоначи ca:Successió de Fibonacci cs:Fibonacciho posloupnost da:Fibonacci-tal de:Fibonacci-Folge el:Ακολουθία Φιμπονάτσι es:Sucesión de Fibonacci eo:Fibonaĉi-nombroj eu:Fibonacciren zenbakiak fr:Suite de Fibonacci ko:피보나치 수 id:Bilangan Fibonacci it:Successione di Fibonacci he:סדרת פיבונאצ'י lv:Fibonači skaitļi hu:Fibonacci-számok nl:Rij van Fibonacci ja:フィボナッチ数 no:Fibonacci-tall pl:Ciąg Fibonacciego pt:Número de Fibonacci ru:Числа Фибоначчи scn:Succissioni di Fibonacci sk:Fibonacciho postupnosť sl:Fibonaccijevo število fi:Fibonaccin lukujono sv:Fibonaccital th:เลขฟีโบนักชี vi:Dãy Fibonacci tr:Fibonacci Serisi uk:Послідовність Фібоначчі zh:斐波那契数列

Personal tools