Saturday, March 12, 2011

How to get Fibonacci Number using PHP codes

In mathematics, the Fibonacci numbers are the numbers in the following integer sequence:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ..(sequence A000045 in OEIS).

By definition, the first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two. Some sources omit the initial 0, instead beginning the sequence with two 1s.
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation


Display output:













F_n = F_{n-1} + F_{n-2},\!\,
with seed values
F_0 = 0 \quad\text{and}\quad F_1 = 1.
The Fibonacci sequence is named after Leonardo of Pisa, who was known as Fibonacci (a contraction of filius Bonacci, "son of Bonaccio"). Fibonacci's 1202 book Liber Abaci introduced the sequence to Western European mathematics,although the sequence was independently described in Indian mathematics and it is disputed which came first.


Download the codes here



0 Responses to “How to get Fibonacci Number using PHP codes”

Post a Comment

All Rights Reserved DevCod | Blogger Template by Bloggermint