Fibonacci numbers are the numbers in the Fibonacci sequence
0, 1, 1, 2, 3, 5, 8, 13, 21, . . . , each of which, after the second
is the sum of the two previous ones.

Fibonacci numbers can also be considered as a function of
non-negative integers:

The exact closed form solution for this function is called the Binet formula:

F(n) = (Phi^n – PhiP^n)/Sqrt(5) (good for all integer n >= 0 or n < 0),
where Phi = (1 + Sqrt(5))/2 = the Golden Ratio = 1.61803398874989484820...,
and PhiP = Phi Prime = (1 – Sqrt(5))/2 = 1 – Phi = –1/Phi = –0.61803398874989484820...,

Since F(n) is an integer and the magnitude of PhiP^n/Sqrt(5) is
less than 1/2 for n >= 0, a variant form of the formula is:

F(n) = Round(Phi^n / Sqrt(5)), n >= 0.

If you have a Fibonacci Number you can compute its index, n = AFib(F(n)) or
AFib(x) = ArcFibonacciNumber(|x|), an integer. The formula is:

Define IsFib(X) = 1 (True) if X is a Fibonacci number, else 0:

Set equal to 1 (True) if |x| is a Fibonacci number, else it is set to 0 (False).
True iff x = 0 or z = |x| is an integer and the closed interval [Phi*z – 1/z,
Phi*z + 1/z] contains a positive integer. Extra testing is performed if x < 0
and |x| is a Fibonacci number. 144, 233, and –144 are Fibonacci number, but –233
is not. For x < 0 to be a Fibonacci number, |x| must be a Fibonacci number and
AFib(|x|) must be even.

IsFib2(X) = IsFib(X) by second method:

Same as IsFib(X) except true iff x = 0 or z = |x| is an integer and 5*x^2 + 4 or
5*x^2 – 4 is a perfect square.

The continuous analytic function:

Fe(x) = (Phi^x – 1 / Phi^x) / Sqrt(5),

passes through all Fibonacci numbers of even n = x (n positive or negative).

The continuous analytic function:

Fo(x) = (Phi^x + 1 / Phi^x) / Sqrt(5),

passes through all Fibonacci numbers of odd n = x (n positive or negative).

passes through all Fibonacci numbers for all n = x (n positive or negative).

This last expression can be reduced to:

Fib(x) = (Phi^x – cos(x*Pi) / Phi^x) / sqrt(5).

Just as factorials can be generalized using the gamma function, Fibonacci
numbers can be generalized using this Fib(x) function.

This formula can even be used to compute the generalized Fibonacci function of a
complex variable. For example Fib(3 + 4*i) = –5248.51130,72837,20182,8...
–14195.96228,83530,10885,8... * i.

It is still true that Fib(x+2) = Fib(x+1) + Fib(x). For example Fib(3.6 + 4.7*i)
= Fib(2.6 + 4.7*i) + Fib(1.6 + 4.7*i).

Fo(x) plot in blue
Fe(x) plot in magenta
Fib(x) plot in red

Copyleft notice by author: Harry J. Smith:
This site is under GFDL (GNU Free Documentation
License) and GPL (GNU General Public License)
and Wikipedia has permission to use material from this site.

This page accessed times since October 20, 2004.
Page created by: hjsmithh@sbcglobal.net
Changes last made on Saturday, 04-Apr-09 13:55:10 PDT