Fibonacci
✖
Fibonacci
Details

- 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 n∈Integers.
- Fibonacci can be evaluated to arbitrary numerical precision.
- Fibonacci automatically threads over lists.
- Fibonacci can be used with Interval and CenteredInterval objects. »
Examples
open allclose allBasic Examples (6)Summary of the most common use cases

https://wolfram.com/xid/0wggrdg-on9

Plot over a subset of the reals:

https://wolfram.com/xid/0wggrdg-bi2uyi

Plot over a subset of the complexes:

https://wolfram.com/xid/0wggrdg-kiedlx

Series expansion at the origin:

https://wolfram.com/xid/0wggrdg-d4yi7q

Series expansion at Infinity:

https://wolfram.com/xid/0wggrdg-cugjvu

Series expansion at a singular point:

https://wolfram.com/xid/0wggrdg-iffsoc

Scope (43)Survey of the scope of standard use cases
Numerical Evaluation (6)

https://wolfram.com/xid/0wggrdg-l274ju


https://wolfram.com/xid/0wggrdg-cksbl4


https://wolfram.com/xid/0wggrdg-b0wt9

The precision of the output tracks the precision of the input:

https://wolfram.com/xid/0wggrdg-y7k4a


https://wolfram.com/xid/0wggrdg-hfml09

Evaluate efficiently at high precision:

https://wolfram.com/xid/0wggrdg-di5gcr


https://wolfram.com/xid/0wggrdg-bq2c6r

Compute worst-case guaranteed intervals using Interval and CenteredInterval objects:

https://wolfram.com/xid/0wggrdg-h0d6g


https://wolfram.com/xid/0wggrdg-dj6d9x

Or compute average-case statistical intervals using Around:

https://wolfram.com/xid/0wggrdg-cw18bq

Compute the elementwise values of an array:

https://wolfram.com/xid/0wggrdg-thgd2

Or compute the matrix Fibonacci function using MatrixFunction:

https://wolfram.com/xid/0wggrdg-o5jpo

Specific Values (6)
Values of Fibonacci at fixed points:

https://wolfram.com/xid/0wggrdg-nww7l

Fibonacci polynomial for symbolic n and x:

https://wolfram.com/xid/0wggrdg-fc9m8o


https://wolfram.com/xid/0wggrdg-bmqd0y


https://wolfram.com/xid/0wggrdg-e41pf2


https://wolfram.com/xid/0wggrdg-f2hrld


https://wolfram.com/xid/0wggrdg-n57vp9

Compute the Fibonacci[7,x] polynomial:

https://wolfram.com/xid/0wggrdg-klij8s

Compute Fibonacci[1/2,x]:

https://wolfram.com/xid/0wggrdg-hfz8z6

Visualization (5)
Plot the Fibonacci function:

https://wolfram.com/xid/0wggrdg-ep4mxd

Plot the Fibonacci polynomial for various orders:

https://wolfram.com/xid/0wggrdg-ecj8m7


https://wolfram.com/xid/0wggrdg-b9zx


https://wolfram.com/xid/0wggrdg-h9nohr

Plot as real parts of two parameters vary:

https://wolfram.com/xid/0wggrdg-elqrq8

Types 2 and 3 of Fibonacci polynomial have different branch cut structures:

https://wolfram.com/xid/0wggrdg-dum9su


https://wolfram.com/xid/0wggrdg-dgvzwe

Function Properties (14)
Fibonacci is defined for all real values:

https://wolfram.com/xid/0wggrdg-cl7ele

Approximate function range of Fibonacci:

https://wolfram.com/xid/0wggrdg-evf2yr


https://wolfram.com/xid/0wggrdg-fphbrc

Fibonacci polynomial of an even order is odd:

https://wolfram.com/xid/0wggrdg-dnla5q

Fibonacci polynomial of an odd order is even:

https://wolfram.com/xid/0wggrdg-bi1e9n

Fibonacci has the mirror property :

https://wolfram.com/xid/0wggrdg-heoddu

Fibonacci threads elementwise over lists:

https://wolfram.com/xid/0wggrdg-svc

Fibonacci is an analytic function of x:

https://wolfram.com/xid/0wggrdg-d4cd2p

Fibonacci is neither non-decreasing nor non-increasingfor odd values:

https://wolfram.com/xid/0wggrdg-hkxwdp

Fibonacci is non-decreasing for even values:

https://wolfram.com/xid/0wggrdg-g6kynf

Fibonacci is not injective for odd values:

https://wolfram.com/xid/0wggrdg-fxi9f9


https://wolfram.com/xid/0wggrdg-zf7zy

Fibonacci is not surjective for odd values:

https://wolfram.com/xid/0wggrdg-laaoku


https://wolfram.com/xid/0wggrdg-c5tkuy

Fibonacci is non-negative for odd values:

https://wolfram.com/xid/0wggrdg-fxktl8

Fibonacci has no singularities or discontinuities:

https://wolfram.com/xid/0wggrdg-qfcpy6


https://wolfram.com/xid/0wggrdg-bfc30u

Fibonacci is convex for odd values:

https://wolfram.com/xid/0wggrdg-duxck

TraditionalForm formatting:

https://wolfram.com/xid/0wggrdg-kiuxyj

Differentiation (3)
First derivatives with respect to n:

https://wolfram.com/xid/0wggrdg-krpoah


https://wolfram.com/xid/0wggrdg-dd1jfo

First derivative with respect to x:

https://wolfram.com/xid/0wggrdg-ez6occ

Higher derivatives with respect to n:

https://wolfram.com/xid/0wggrdg-z33jv

Plot the higher derivatives with respect to n:

https://wolfram.com/xid/0wggrdg-fxwmfc

Formula for the derivative with respect to n:

https://wolfram.com/xid/0wggrdg-cb5zgj

Integration (3)
Compute the indefinite integral using Integrate:

https://wolfram.com/xid/0wggrdg-bponid


https://wolfram.com/xid/0wggrdg-b9jw7l


https://wolfram.com/xid/0wggrdg-cas


https://wolfram.com/xid/0wggrdg-76sc

Series Expansions (4)
Find the Taylor expansion using Series:

https://wolfram.com/xid/0wggrdg-ewr1h8

Plots of the first three approximations around :

https://wolfram.com/xid/0wggrdg-binhar

General term in the series expansion using SeriesCoefficient:

https://wolfram.com/xid/0wggrdg-dznx2j

Find the series expansion at Infinity:

https://wolfram.com/xid/0wggrdg-syq

Taylor expansion at a generic point:

https://wolfram.com/xid/0wggrdg-jwxla7

Function Identities and Simplifications (2)
The ordinary generating function of Fibonacci:

https://wolfram.com/xid/0wggrdg-j2oret


https://wolfram.com/xid/0wggrdg-cq178j

Generalizations & Extensions (2)Generalized and extended use cases
Applications (13)Sample problems that can be solved with this function
Solve the Fibonacci recurrence equation:

https://wolfram.com/xid/0wggrdg-jhwy4x


https://wolfram.com/xid/0wggrdg-bbu2xl

Solve another Fibonacci recurrence equation:

https://wolfram.com/xid/0wggrdg-h7f


https://wolfram.com/xid/0wggrdg-y9f

Find ratios of successive Fibonacci numbers:

https://wolfram.com/xid/0wggrdg-bhp

Compare with continued fractions:

https://wolfram.com/xid/0wggrdg-ttp

Convergence to the golden ratio:

https://wolfram.com/xid/0wggrdg-fk1

Fibonacci substitution system:

https://wolfram.com/xid/0wggrdg-0d


https://wolfram.com/xid/0wggrdg-sup


https://wolfram.com/xid/0wggrdg-6j

https://wolfram.com/xid/0wggrdg-f6o

Calculate the number of ways to write an integer as a sum of Fibonacci numbers :

https://wolfram.com/xid/0wggrdg-xbv
Plot the counts for the first hundred integers:

https://wolfram.com/xid/0wggrdg-bnncvi

Lamé's theorem bounds the number of steps of the Euclidean algorithm for calculating :

https://wolfram.com/xid/0wggrdg-emi

https://wolfram.com/xid/0wggrdg-iy4
Plot the maximal number of steps:

https://wolfram.com/xid/0wggrdg-gkq

Find the first Fibonacci number above 1000000:

https://wolfram.com/xid/0wggrdg-v0e


https://wolfram.com/xid/0wggrdg-e870i

Plot the discrete inverse of Fibonacci numbers:

https://wolfram.com/xid/0wggrdg-tqt

Plot of the absolute value of Fibonacci over the complex plane:

https://wolfram.com/xid/0wggrdg-kt3

Find the number of factors of Fibonacci polynomials:

https://wolfram.com/xid/0wggrdg-zi


https://wolfram.com/xid/0wggrdg-dit7gz


https://wolfram.com/xid/0wggrdg-kxsa0

https://wolfram.com/xid/0wggrdg-474fx

This is a particular case of a more general identity :

https://wolfram.com/xid/0wggrdg-c6337o

The sequence of is periodic with respect to
for a fixed natural number
:

https://wolfram.com/xid/0wggrdg-b1kjg1


https://wolfram.com/xid/0wggrdg-ezv2ym

Build Zeckendorf's representation of a positive integer [MathWorld]:

https://wolfram.com/xid/0wggrdg-cya1fa

https://wolfram.com/xid/0wggrdg-giaizb


https://wolfram.com/xid/0wggrdg-b7nshg

Define Fibonacci multiplication for positive integers:

https://wolfram.com/xid/0wggrdg-2ycp2
Fibonacci multiplication table:

https://wolfram.com/xid/0wggrdg-ewghza

Verify that the Fibonacci multiplication is associative:

https://wolfram.com/xid/0wggrdg-ckqpj8

Properties & Relations (15)Properties of the function, and connections to other functions
Fibonacci Numbers (13)
Expand in terms of elementary functions:

https://wolfram.com/xid/0wggrdg-eqx


https://wolfram.com/xid/0wggrdg-rt2


https://wolfram.com/xid/0wggrdg-pxq

Explicit recursive definition:

https://wolfram.com/xid/0wggrdg-mnv

https://wolfram.com/xid/0wggrdg-1u

https://wolfram.com/xid/0wggrdg-zgn

Explicit state‐space recursive definition:

https://wolfram.com/xid/0wggrdg-j57xh

https://wolfram.com/xid/0wggrdg-b20glg

https://wolfram.com/xid/0wggrdg-cb96j6

https://wolfram.com/xid/0wggrdg-kn0oqw

Closed‐form solution using MatrixPower:

https://wolfram.com/xid/0wggrdg-fwu5wy

Simplify expressions involving Fibonacci numbers:

https://wolfram.com/xid/0wggrdg-po7


https://wolfram.com/xid/0wggrdg-qhl


https://wolfram.com/xid/0wggrdg-vzs

Fibonacci numbers as coefficients:

https://wolfram.com/xid/0wggrdg-zcw

Express a fractional Fibonacci number as an algebraic number:

https://wolfram.com/xid/0wggrdg-pzo

Fibonacci can be represented as a DifferenceRoot:

https://wolfram.com/xid/0wggrdg-pxkma


https://wolfram.com/xid/0wggrdg-53182

General term in the series expansion of Fibonacci:

https://wolfram.com/xid/0wggrdg-dlm2b6

The generating function for Fibonacci:

https://wolfram.com/xid/0wggrdg-pz93yz


https://wolfram.com/xid/0wggrdg-frz0l8

FindSequenceFunction can recognize the Fibonacci sequence:

https://wolfram.com/xid/0wggrdg-hj2mn6


https://wolfram.com/xid/0wggrdg-5okec

The exponential generating function for Fibonacci:

https://wolfram.com/xid/0wggrdg-gaiyeu

Possible Issues (3)Common pitfalls and unexpected behavior
Large arguments can give results too large to be computed explicitly:

https://wolfram.com/xid/0wggrdg-v3y


Results for integer arguments may not hold for non-integers:

https://wolfram.com/xid/0wggrdg-emc


https://wolfram.com/xid/0wggrdg-er4

Matrix power representation is valid only for integers:

https://wolfram.com/xid/0wggrdg-hnc


https://wolfram.com/xid/0wggrdg-zcb

Neat Examples (8)Surprising or curious use cases

https://wolfram.com/xid/0wggrdg-qpr


https://wolfram.com/xid/0wggrdg-hae

Fibonacci modulo n [more info]:

https://wolfram.com/xid/0wggrdg-bx9

Count the number of 1, 2, ..., 9, 0 digits in the 1,000,000 Fibonacci number:

https://wolfram.com/xid/0wggrdg-b99v9u

Contours of vanishing real and imaginary parts of Fibonacci:

https://wolfram.com/xid/0wggrdg-h1k5c5

LogPlot of positive and negative Fibonacci numbers:

https://wolfram.com/xid/0wggrdg-ig2h1a

While the Fibonacci numbers are nondecreasing for non-negative arguments, the Fibonacci function possesses a single local minimum:

https://wolfram.com/xid/0wggrdg-gqu

Since the generating function is rational, these sums come out as rational numbers:

https://wolfram.com/xid/0wggrdg-qd3cak


https://wolfram.com/xid/0wggrdg-st0


https://wolfram.com/xid/0wggrdg-nlg

Wolfram Research (1996), Fibonacci, Wolfram Language function, https://reference.wolfram.com/language/ref/Fibonacci.html (updated 2002).
Text
Wolfram Research (1996), Fibonacci, Wolfram Language function, https://reference.wolfram.com/language/ref/Fibonacci.html (updated 2002).
Wolfram Research (1996), Fibonacci, Wolfram Language function, https://reference.wolfram.com/language/ref/Fibonacci.html (updated 2002).
CMS
Wolfram Language. 1996. "Fibonacci." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2002. https://reference.wolfram.com/language/ref/Fibonacci.html.
Wolfram Language. 1996. "Fibonacci." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2002. https://reference.wolfram.com/language/ref/Fibonacci.html.
APA
Wolfram Language. (1996). Fibonacci. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Fibonacci.html
Wolfram Language. (1996). Fibonacci. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Fibonacci.html
BibTeX
@misc{reference.wolfram_2025_fibonacci, author="Wolfram Research", title="{Fibonacci}", year="2002", howpublished="\url{https://reference.wolfram.com/language/ref/Fibonacci.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_fibonacci, organization={Wolfram Research}, title={Fibonacci}, year={2002}, url={https://reference.wolfram.com/language/ref/Fibonacci.html}, note=[Accessed: 29-March-2025
]}