This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# Fibonacci

 Fibonacci[n]gives the Fibonacci number . Fibonaccigives the Fibonacci polynomial .
• Mathematical function, suitable for both symbolic and numerical manipulation.
• The satisfy the recurrence relation with .
• For any complex value of n the are given by the general formula , where is the golden ratio.
• The Fibonacci polynomial is the coefficient of in the expansion of .
• The Fibonacci polynomials satisfy the recurrence relation .
• FullSimplify and FunctionExpand include transformation rules for combinations of Fibonacci numbers with symbolic arguments when the arguments are specified to be integers using nIntegers.
• Fibonacci can be evaluated to arbitrary numerical precision.
Compute Fibonacci numbers:
Compute Fibonacci numbers:
 Out[1]=
 Scope   (7)
Evaluate large Fibonacci numbers:
Fibonacci numbers of negative argument:
Non-integer arguments:
Complex arguments:
Series expansion at generic point:
Fibonacci polynomials:
General series expansion at infinity:
 Applications   (12)
Solve the Fibonacci recurrence equation:
Find ratios of successive Fibonacci numbers:
Compare with continued fractions:
Convergence to the golden ratio:
Fibonacci substitution system:
Fibonomial coefficients:
Calculate the number of ways to write an integer as a sum of Fibonacci numbers :
Plot the counts for the first hundred integers:
Lamé's theorem bounds the number of steps of the Euclidean algorithm for calculating :
Plot the maximal number of steps:
Find the first Fibonacci number above :
Plot the discrete inverse of Fibonacci numbers:
Plot of the absolute value of Fibonacci over the complex plane:
Find the number of factors of Fibonacci polynomials:
If divides , then divides :
This is a particular case of a more general identity :
The sequence of is periodic with respect to for a fixed natural number :
For the period equals :
Expand in terms of elementary functions:
Limiting ratio:
Explicit recursive definition:
Explicit state-space recursive definition:
Closed-form solution using MatrixPower:
Simplify expressions involving Fibonacci numbers:
Symbolic summation:
Generating function:
Fibonacci numbers as coefficients:
Express a fractional Fibonacci number as an algebraic number:
Expand in terms of elementary functions:
Explicitly construct Fibonacci polynomials:
Large arguments can give results too large to be computed explicitly:
Results for integer arguments may not hold for non-integers:
Matrix power representation is valid only for integers:
Fibonacci numbers modulo 10:
Fibonacci modulo n :
Count the number of 1, 2, ..., 9, 0 digits in the 1,000,000 Fibonacci number:
Contours of vanishing real and imaginary parts of Fibonacci:
LogPlot of positive and negative Fibonacci numbers:
While the Fibonacci numbers are nondecreasing for non-negative arguments, the Fibonacci function possesses a single local minimum:
Since the generating function is rational these sums come out as rational numbers: