Difference between revisions of "Fibonacci sequence"

(<math>\phi</math> and Binet's Formula: fix latex)
m
(9 intermediate revisions by 7 users not shown)
Line 9: Line 9:
 
As with many linear recursions, we can run the Fibonacci sequence backwards by solving its recursion relation for the term of smallest index, in this case <math>F_{n - 2} = F_{n} - F_{n - 1}</math>.  This allows us to compute, for example, that <math>F_0 = F_2 - F_1 = 0</math>, <math>F_{-1} = 1</math>, <math>F_{-2} = -2</math>, and so on.  Because these preceding terms are uniquely defined by the recursion, one frequently sees the definition of the Fibonacci sequence given in the form <math>F_0 = 0</math>, <math>F_1 = 1</math> and <math>F_n = F_{n - 1} + F_{n - 2}</math> for <math>n \geq 2</math>.  In general, one can show that <math>F_n = (-1)^{n+1}F_{-n}</math>.
 
As with many linear recursions, we can run the Fibonacci sequence backwards by solving its recursion relation for the term of smallest index, in this case <math>F_{n - 2} = F_{n} - F_{n - 1}</math>.  This allows us to compute, for example, that <math>F_0 = F_2 - F_1 = 0</math>, <math>F_{-1} = 1</math>, <math>F_{-2} = -2</math>, and so on.  Because these preceding terms are uniquely defined by the recursion, one frequently sees the definition of the Fibonacci sequence given in the form <math>F_0 = 0</math>, <math>F_1 = 1</math> and <math>F_n = F_{n - 1} + F_{n - 2}</math> for <math>n \geq 2</math>.  In general, one can show that <math>F_n = (-1)^{n+1}F_{-n}</math>.
  
== <math>\phi</math> and Binet's Formula==
+
== <math>\varphi</math> and Binet's Formula==
 
{{main|Binet's formula}}
 
{{main|Binet's formula}}
  
The ratios <math>\frac{1}{1}</math>, <math>\frac{2}{1}</math>, <math>\frac{3}{2}</math>, <math>\frac{5}{3}</math>, <math>\frac{8}{5}</math>, ..., between successive terms of the sequence tend towards the limit <math>\frac{1 + \sqrt{5}}{2}</math>, a constant often denoted <math>\varphi</math> (the Greek letter [[phi]], which is also notated as <math>\phi</math>), where <math>\varphi=\frac{1+\sqrt 5}{2}</math>. <math>\varphi</math> is a solution of the quadratic <math>x^2-x-1=0</math>. The other root is <math>\frac{1-\sqrt{5}}{2}</math>, which is commonly denoted <math>\Phi</math>, or the capital letter for phi.  One possible explanation for this fact is that the Fibonacci numbers are given explicitly by Binet's formula.  It is  
+
The ratios <math>\frac{1}{1}</math>, <math>\frac{2}{1}</math>, <math>\frac{3}{2}</math>, <math>\frac{5}{3}</math>, <math>\frac{8}{5}</math>, ..., between successive terms of the sequence tend towards the limit <math>\frac{1 + \sqrt{5}}{2}</math>, a constant often denoted <math>\varphi</math> (the Greek letter [[phi]], also written <math>\phi</math>). <math>\varphi</math> is a solution of the quadratic equation <math>x^2-x-1=0</math>. The other root is <math>-\varphi^{-1} = \frac{1-\sqrt{5}}{2}</math>.  One possible explanation for this fact is that the Fibonacci numbers are given explicitly by Binet's formula.  It is  
<math>F_n = \frac{1}{\sqrt{5}} (\phi^n)-\frac{1}{\sqrt{5}}(\Phi^n)</math>.
+
<math>F_n = \frac{\varphi^n - (-\varphi)^{-n}}{\sqrt{5}}</math>.
 
(Note that this formula is valid for all integers <math>n</math>.)
 
(Note that this formula is valid for all integers <math>n</math>.)
 
It is so named because it was derived by mathematician Jacques Philippe Marie Binet, though it was already known by Abraham de Moivre.
 
It is so named because it was derived by mathematician Jacques Philippe Marie Binet, though it was already known by Abraham de Moivre.
Line 25: Line 25:
 
*<math>F_{n-1}\cdot F_{n+1} = F_{n}^2 + (-1)^n</math>
 
*<math>F_{n-1}\cdot F_{n+1} = F_{n}^2 + (-1)^n</math>
 
*<math>F_{m+n+1} = F_{m+1} \cdot F_{n+1} + F_{m} \cdot F_n</math>
 
*<math>F_{m+n+1} = F_{m+1} \cdot F_{n+1} + F_{m} \cdot F_n</math>
 +
  
 
==Problems==
 
==Problems==
Line 38: Line 39:
 
# Seven line segments, with lengths no greater than 10 inches, and no shorter than 1 inch, are given. Show that one can choose three of them to represent the sides of a triangle. <div style="text-align:right">(Manhattan Mathematical Olympiad 2004)</div>
 
# Seven line segments, with lengths no greater than 10 inches, and no shorter than 1 inch, are given. Show that one can choose three of them to represent the sides of a triangle. <div style="text-align:right">(Manhattan Mathematical Olympiad 2004)</div>
 
# Except for the first two terms, each term of the sequence <math>1000, x, 1000 - x,\ldots</math> is obtained by subtracting the preceding term from the one before that.  The last term of the sequence is the first [[negative]] term encounted.  What positive integer <math>x</math> produces a sequence of maximum length? <div style="text-align:right">([[1998 AIME Problems/Problem 8|1998 AIME, Problem 8]])</div>
 
# Except for the first two terms, each term of the sequence <math>1000, x, 1000 - x,\ldots</math> is obtained by subtracting the preceding term from the one before that.  The last term of the sequence is the first [[negative]] term encounted.  What positive integer <math>x</math> produces a sequence of maximum length? <div style="text-align:right">([[1998 AIME Problems/Problem 8|1998 AIME, Problem 8]])</div>
# A [[fair]] coin is to be tossed <math>10_{}^{}</math> times. Let <math>i/j^{}_{}</math>, in lowest terms, be the [[probability]] that heads never occur on consecutive tosses. Find <math>i+j_{}^{}</math>. <div style="text-align:right">([[1990 AIME Problems/Problem 9|1990 AIME, Problem 9]])</div>
+
# A fair coin is to be tossed <math>10_{}^{}</math> times. Let <math>\frac ij^{}_{}</math>, in lowest terms, be the [[probability]] that heads never occur on consecutive tosses. Find <math>i+j_{}^{}</math>. <div style="text-align:right">([[1990 AIME Problems/Problem 9|1990 AIME, Problem 9]])</div>
#Find <math>a</math> if <math>a</math> and <math>b</math> are [[integer]]s such that <math>x^2 - x - 1</math> is a factor of <math>ax^{17} + bx^{16} + 1</math>. <div style="text-align:right">([[1998 AIME Problems/Problem 13|1998 AIME, Problem 13]])</div>
+
#Find <math>a</math> if <math>a</math> and <math>b</math> are [[integer]]s such that <math>x^2 - x - 1</math> is a factor of <math>ax^{17} + bx^{16} + 1</math>. <div style="text-align:right">([[1988 AIME Problems/Problem 13|1988 AIME, Problem 13]])</div>
  
 
=== Olympiad ===
 
=== Olympiad ===
Line 46: Line 47:
 
==See also==
 
==See also==
 
* [[Combinatorics]]
 
* [[Combinatorics]]
* [[Lucas number]]
+
* [[Lucas Numbers]]
  
 +
==External Links==
 +
* [http://www.scriptspedia.org/Fibonacci_Numbers Fibonacci Algorithm implementation in C++, Java and Javascript]
 
[[Category:Combinatorics]]
 
[[Category:Combinatorics]]

Revision as of 16:59, 4 July 2019

The Fibonacci sequence is a sequence of integers in which the first and second terms are both equal to 1 and each subsequent term is the sum of the two preceding it. The first few terms are $1, 1, 2, 3, 5, 8, 13, 21, 34, 55,...$.

Recursion

The Fibonacci sequence can be written recursively as $F_1 = F_2 = 1$ and $F_n=F_{n-1}+F_{n-2}$ for $n \geq 3$. This is the simplest nontrivial example of a linear recursion with constant coefficients. There is also an explicit formula below.

Readers should be wary: some authors give the Fibonacci sequence with the initial conditions $F_0 = F_1 = 1$ (or equivalently $F_1 = 1, F_2 = 2$). This change in indexing does not affect the actual numbers in the sequence, but it does change which member of the sequence is referred to by the symbol $F_n$ and so also changes the appearance of certain identities involving the Fibonacci numbers.

Running Backwards

As with many linear recursions, we can run the Fibonacci sequence backwards by solving its recursion relation for the term of smallest index, in this case $F_{n - 2} = F_{n} - F_{n - 1}$. This allows us to compute, for example, that $F_0 = F_2 - F_1 = 0$, $F_{-1} = 1$, $F_{-2} = -2$, and so on. Because these preceding terms are uniquely defined by the recursion, one frequently sees the definition of the Fibonacci sequence given in the form $F_0 = 0$, $F_1 = 1$ and $F_n = F_{n - 1} + F_{n - 2}$ for $n \geq 2$. In general, one can show that $F_n = (-1)^{n+1}F_{-n}$.

$\varphi$ and Binet's Formula

Main article: Binet's formula

The ratios $\frac{1}{1}$, $\frac{2}{1}$, $\frac{3}{2}$, $\frac{5}{3}$, $\frac{8}{5}$, ..., between successive terms of the sequence tend towards the limit $\frac{1 + \sqrt{5}}{2}$, a constant often denoted $\varphi$ (the Greek letter phi, also written $\phi$). $\varphi$ is a solution of the quadratic equation $x^2-x-1=0$. The other root is $-\varphi^{-1} = \frac{1-\sqrt{5}}{2}$. One possible explanation for this fact is that the Fibonacci numbers are given explicitly by Binet's formula. It is $F_n = \frac{\varphi^n - (-\varphi)^{-n}}{\sqrt{5}}$. (Note that this formula is valid for all integers $n$.) It is so named because it was derived by mathematician Jacques Philippe Marie Binet, though it was already known by Abraham de Moivre.

Identities

The most important identity regarding the Fibonacci sequence is its recursive definition, $F_{n+1} = F_n + F_{n-1}$. The following identities involving the Fibonacci numbers can be proved by induction.

  • $F_0 + F_1 + \cdots + F_{n} = F_{n+2} - 1$
  • $F_0 - F_1 + F_2 - \cdots - F_{2n-1} + F_{2n} = F_{2n-1} - 1$
  • $F_0^2 + F_1^2 + F_2^2 + \cdots + F_n^2 = F_n \cdot F_{n+1}$
  • $F_{n-1}\cdot F_{n+1} = F_{n}^2 + (-1)^n$
  • $F_{m+n+1} = F_{m+1} \cdot F_{n+1} + F_{m} \cdot F_n$


Problems

Introductory

  1. The Fibonacci sequence $1,1,2,3,5,8,13,21,\ldots$ starts with two 1s, and each term afterwards is the sum of its two predecessors. Which one of the ten digits is the last to appear in the units position of a number in the Fibonacci sequence?

    $\mathrm{(A) \ 0 } \qquad \mathrm{(B) \ 4 } \qquad \mathrm{(C) \ 6 } \qquad \mathrm{(D) \ 7 } \qquad \mathrm{(E) \ 9 }$
  2. A colony has $1$ rabbit. A rabbit produces one offspring every month. An offspring rabbit takes one month to grow up. Find a formula for the number of rabbits (including offspring) in the $n$th month.
    1. How about if the colony starts with $a$ rabbits and $b$ offspring?
    2. Use this result to prove the identity $F_{m+n+1} = F_{m+1} \cdot F_{n+1} + F_{m} \cdot F_n$.
  3. Find $\gcd(F_n,F_{n+1})$.
  4. Prove the above identites.

Intermediate

  1. Seven line segments, with lengths no greater than 10 inches, and no shorter than 1 inch, are given. Show that one can choose three of them to represent the sides of a triangle.
    (Manhattan Mathematical Olympiad 2004)
  2. Except for the first two terms, each term of the sequence $1000, x, 1000 - x,\ldots$ is obtained by subtracting the preceding term from the one before that. The last term of the sequence is the first negative term encounted. What positive integer $x$ produces a sequence of maximum length?
  3. A fair coin is to be tossed $10_{}^{}$ times. Let $\frac ij^{}_{}$, in lowest terms, be the probability that heads never occur on consecutive tosses. Find $i+j_{}^{}$.
  4. Find $a$ if $a$ and $b$ are integers such that $x^2 - x - 1$ is a factor of $ax^{17} + bx^{16} + 1$.

Olympiad

  1. Determine the maximum value of $m^2 + n^2$, where $m$ and $n$ are integers satisfying $m, n \in \{ 1,2, \ldots , 1981 \}$ and $( n^2 - mn - m^2 )^2 = 1$.

See also

External Links