Fibonacci Numbers with Loops and Tables The Fibonacci Numbers are a sequence of
ID: 3639103 • Letter: F
Question
Fibonacci Numbers with Loops and Tables
The Fibonacci Numbers are a sequence of numbers that are important in many fields, such as Finance, Biology, and Computer Science. Each number in the sequence is related to the previous numbers. The first few Fibonacci Numbers are shown below.
0,1,1,2,3,5,8,13,21,34,55,89,144,...
To determine any Fibonacci Number, we begin with the 2 starting values.
x[0] := 0;
x[1] := 1;
From this point, we can find any other number using the following formula.
x[i] := x[i-1]+x[i-2]
For Example, we can find the 8th Fibonacci Number with the following formula.
x[8] := x[7]+x[6]
This is a simple calculation if the values of x[6] and x[7] are already known.
There are many ways to find a Fibonacci Number. In this question, we will use loops and tables. By creating a table with the inital values for x[0] and x[1], we can use a while loop to count up to any Fibonnacci Number.
(a) What is the 25th Fibonacci Number?
(b) What is the 116th Fibonacci Number?
(c) What is the smallest value of i making x[i] > 280571172992510140037611932413038677189525?
The Methods used to solve the Fibonnacci Sequence can be used for many similar relationships. This type of relationship is called a Recurrence Relation.
Another relationship is defined by the following information.
y[0] := 0
y[1] := 6;
y[i] := 40 * y[i-1] + 32 * y[i-2];
Use this relationship to answer the following questions.
(d) What is the 27th number in this sequence?
(e) What is the 42th number in the sequence?
(f) What is the smallest value of i making y[i] > 1270712560312840194488500111321559894444128197854104983870918022487722296660865085543064203798367859284363538676628556225748087842385869720780800?
Fibonacci Numbers with Loops and Tables
The Fibonacci Numbers are a sequence of numbers that are important in many fields, such as Finance, Biology, and Computer Science. Each number in the sequence is related to the previous numbers. The first few Fibonacci Numbers are shown below.
0,1,1,2,3,5,8,13,21,34,55,89,144,...
To determine any Fibonacci Number, we begin with the 2 starting values.
x[0] := 0;
x[1] := 1;
From this point, we can find any other number using the following formula.
x[i] := x[i-1]+x[i-2]
For Example, we can find the 8th Fibonacci Number with the following formula.
x[8] := x[7]+x[6]
This is a simple calculation if the values of x[6] and x[7] are already known.
There are many ways to find a Fibonacci Number. In this question, we will use loops and tables. By creating a table with the inital values for x[0] and x[1], we can use a while loop to count up to any Fibonnacci Number.
(a) What is the 25th Fibonacci Number?
(b) What is the 116th Fibonacci Number?
(c) What is the smallest value of i making x[i] > 280571172992510140037611932413038677189525?
The Methods used to solve the Fibonnacci Sequence can be used for many similar relationships. This type of relationship is called a Recurrence Relation.
Another relationship is defined by the following information.
y[0] := 0
y[1] := 6;
y[i] := 40 * y[i-1] + 32 * y[i-2];
Use this relationship to answer the following questions.
(d) What is the 27th number in this sequence?
(e) What is the 42th number in the sequence?
(f) What is the smallest value of i making y[i] > 1270712560312840194488500111321559894444128197854104983870918022487722296660865085543064203798367859284363538676628556225748087842385869720780800?
Explanation / Answer
25th Fibonacci Number = 46368 116th Fibonacci Number=4.831629526120103e+23 27th number = 121393 42th number =165580141 answer for c = 202 answer for f = 698
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.