Sunday

April 20, 2014

April 20, 2014

Posted by **Nelly** on Thursday, February 24, 2011 at 7:06am.

Help:/

- Computer -
**MathMate**, Thursday, February 24, 2011 at 8:48amThe fibonacci series is defined as the set of terms a(n)∈Z+ (i.e. all terms are integers) such that:

a(0)=0

a(1)=1

a(i)=a(i-2)+a(i-1), i≥2

The pseudocode resembles a lot the definition of the series:

Input: n

a(0)=0

a(1)=1

for i=2,i<=n,i++: a(i)=a(i-2)+a(i-1) next

return a(n)

Note that a closed form formula for evaluating a(n) exists, and is called the Binet's formula:

a(n)=((p^n-(-1/p)^n)/sqrt(5)

where p=(1+sqrt(5))/2 = the golden ratio

However, since the result has to be an integer, and the calculations required are real, there could be rounding problems with calculations performed on a digital computer, unless symbolic algebra is available.

**Related Questions**

Pre-Calc - Find three examples of the Fibonacci sequence in nature. Write a ...

physics - n this problem, we will carry out some steps of the quantum factoring ...

Quantum Physics - In this problem, we will carry out some steps of the quantum ...

programming - Write an algorithm that converts a decimal number to binary. Then...

Algorithm - write a pseudo code algorithm that will accept 20 numbers and finds ...

programming - Write an algorithm that prints the factorial for the first 20 even...

Algorithm - Write an algorithm to delete the fifth record in a master file of 50...

Algorithm - write a pseudo code algorithm that will accept the marks in a test ...

Quantum Computing - In this problem, we will carry out some steps of the quantum...

physics - In this problem, we will carry out some steps of the quantum factoring...