Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Calculus > Discrete Calculus > Recurrence and Sum Functions >
Mathematica > Mathematics and Algorithms > Discrete Mathematics > Discrete Calculus > Recurrence and Sum Functions >
Mathematica > Mathematics and Algorithms > Mathematical Functions > Integer Functions > Recurrence and Sum Functions >

Fibonacci

Fibonacci[n]
gives the Fibonacci number F_n.
Fibonacci[n, x]
gives the Fibonacci polynomial F_n(x).
  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • The F_n satisfy the recurrence relation F_n=F_(n-1)+F_(n-2) with F_1=F_2=1.
  • For any complex value of n the F_n are given by the general formula , where phi is the Golden Ratio.
  • The Fibonacci polynomial F_n(x) is the coefficient of t^n in the expansion of t/(1-xt-t^2).
  • The Fibonacci polynomials satisfy the recurrence relation F_n(x)=xF_(n-1)(x)+F_(n-2)(x).
  • FullSimplify and FunctionExpand include transformation rules for combinations of Fibonacci numbers with symbolic arguments when the arguments are specified to be integers using nElementIntegers.
  • Fibonacci can be evaluated to arbitrary numerical precision.
Compute Fibonacci numbers:
Compute Fibonacci numbers:
In[1]:=
Click for copyable input
Out[1]=
Evaluate large Fibonacci numbers:
Fibonacci numbers of negative argument:
Non-integer arguments:
Complex arguments:
Fibonacci threads element-wise over lists:
Series expansion at generic point:
TraditionalForm formatting:
Fibonacci polynomials:
General series expansion at infinity:
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 F_1,F_2,...:
Plot the counts for the first hundred integers:
Lamé's theorem bounds the number of steps of the Euclidean algorithm for calculating gcd(a,b):
Plot the maximal number of steps:
Find the first Fibonacci number above 1000000:
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:
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 [more info]:
Count the number of 1, 2, ..., 9, 0 digits in the 1,000,000^(th) 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:
New in 3 | Last modified in 4
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team