987/610

## Calculation

### Closed form expression

Like every sequence defined by linear recurrence, the Fibonacci numbers have a closed-form solution. It has become known as **Binet****‘s formula**, even though it was already known by Abraham de Moivre:^{[11]}

where

is the golden ratio (sequence A001622 in OEIS).

That

follows from the defining equation above.

The Fibonacci recursion

is similar to the defining equation of the golden ratio in the form

which is also known as the generating polynomial of the recursion.

#### [edit]Proof by induction

Any root of the equation above satisfies and multiplying by shows:

By definition is a root of the equation, and the other root is Therefore:

and

Both and are geometric series (for *n* = 1, 2, 3, …) that satisfy the Fibonacci recursion. The first series grows exponentially; the second exponentially tends to zero, with alternating signs. Because the Fibonacci recursion is linear, any linear combination of these two series will also satisfy the recursion. These linear combinations form a two-dimensional linear vector space; the original Fibonacci sequence can be found in this space.

Linear combinations of series and , with coefficients *a* and *b*, can be defined by

- for any real

All thus-defined series satisfy the Fibonacci recursion

Requiring that *F*_{a,b}(0) = 0 and *F*_{a,b}(1) = 1 yields and , resulting in the formula of Binet we started with. It has been shown that this formula satisfies the Fibonacci recursion. Furthermore, an explicit check can be made:

and

establishing the base cases of the induction, proving that

- for all

Therefore, for any two starting values, a combination *a*,*b* can be found such that the function is the exact closed formula for the series.

#### [edit]Computation by rounding

Since for all , the number *F*(*n*) is the closest integer to Therefore it can be found by rounding, or in terms of the floor function:

Similarly, if you already know that the number **F** is a Fibonacci number, you can determine its index within the sequence by

### [edit]Limit of consecutive quotients

Johannes Kepler observed that the ratio of consecutive Fibonacci numbers converges. He wrote that “as 5 is to 8 so is 8 to 13, practically, and as 8 is to 13, so is 13 to 21 almost”, and concluded that the limit approaches the golden ratio .^{[12]}

This convergence does not depend on the starting values chosen, excluding 0, 0. For example, the initial values 19 and 31 generate the sequence 19, 31, 50, 81, 131, 212, 343, 555 … etc. The ratio of consecutive terms in this sequence shows the same convergence towards the golden ratio.

#### [edit]Proof

In brief, Fibonacci numbers are approximately exponential: where the constant depends on starting values – as the remaining term in the exact formula for the Fibonacci numbers becomes exponentially close to zero as *n* grows. Taking the ratio yields

More formally, it must always follow from the explicit formula that for any real

because and thus

### [edit]Decomposition of powers of the golden ratio

Since the golden ratio satisfies the equation

this expression can be used to decompose higher powers as a linear function of lower powers, which in turn can be decomposed all the way down to a linear combination of and 1. The resulting recurrence relationships yield Fibonacci numbers as the linear coefficients:

This expression is also true for if the Fibonacci sequence is extended to negative integers using the Fibonacci rule

## [edit]Matrix form

A 2-dimensional system of linear difference equations that describes the Fibonacci sequence is

or

The eigenvalues of the matrix A are and , and the elements of the eigenvectors of A, and , are in the ratios and Using these facts, and the properties of eigenvalues, we can derive a direct formula for the nth element in the fibonacci series:

This matrix has a determinant of −1, and thus it is a 2×2 unimodular matrix. This property can be understood in terms of the continued fraction representation for the golden ratio:

The Fibonacci numbers occur as the ratio of successive convergents of the continued fraction for , and the matrix formed from successive convergents of any continued fraction has a determinant of +1 or −1.

The matrix representation gives the following closed expression for the Fibonacci numbers:

Taking the determinant of both sides of this equation yields Cassini’s identity

Additionally, since *A*^{n}*A*^{m} = *A*^{m + n} for any square matrix *A*, the following identities can be derived:

In particular, with *m* = *n*,

For another way to derive the *F*_{2n + k} formulas see the “EWD note” by Dijkstra.^{[13]}