Fibonacci
Usage
Notes
Further Examples
Here is a list of the first few Fibonacci numbers.
In[1]:=
|
Out[1]=
|
Here is the th Fibonacci number.
In[2]:=
|
Out[2]=
|
The limit as of the ratio of successive Fibonacci numbers is GoldenRatio.
In[3]:=
|
Out[3]=
|
Here are some identities involving Fibonacci numbers.
In[4]:=
|
Out[4]=
|
In[5]:=
|
Out[5]=
|
In[6]:=
|
Out[6]=
|
In[7]:=
|
Out[7]=
|
Here are some simplifications involving Fibonacci numbers.
In[8]:=
|
Out[8]=
|
In[9]:=
|
Out[9]=
|
In[10]:=
|
Out[10]=
|
You can use FunctionExpand to expand expressions involving Fibonacci numbers.
In[11]:=
|
Out[11]=
|
You can get rid of the Cos with Simplify.
In[12]:=
|
Out[12]=
|
Here is a similar example for Fibonacci polynomials.
In[13]:=
|
Out[13]=
|
In[14]:=
|
Out[14]=
|
The defined function LeadingIndex gives the largest integer k such that Fibonacci[k] does not exceed n.
In[15]:=
|
In[16]:=
|
Out[16]=
|
Every non-negative integer can be written uniquely as a sum of Fibonacci numbers no two consecutive. The defined function ZeckendorfRepresentation gives the coefficients of this expansion descending from the leading index.
In[17]:=
|
Here is the Zeckendorf representation of .
In[18]:=
|
Out[18]=
|
In[19]:=
|
Out[19]=
|
The defined function ff gives the Fibonacci numbers corresponding to the Zeckendorf representation r.
In[20]:=
|
In[21]:=
|
Out[21]=
|
In[22]:=
|
Out[22]=
|
In[23]:=
|
|