Question: Using R: 2. Vector v= 1 1 is in fact the first 9 Fibonacci numbers where 2 3 5 8 13 21 34 21 =
Using R:

2. Vector v= 1 1 is in fact the first 9 Fibonacci numbers where 2 3 5 8 13 21 34 21 = 1,22 = 1,...,19 = 34. 21 34 These numbers are given by the recurrence relation en = In-1 + In-2 for n > 2 where we first define (i = 1 and 22 = 1. a. Use a while loop to generate a vector x containing the first 9 Fibonacci numbers. b. Use a repeat loop to generate a vector x containing the first 9 Fibonacci numbers. c. Use a for loop to generate a vector x containing the first 9 Fibonacci numbers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
