Generate the first 5 terms of this sequence: f(1) = 2 and f(2) = 3, f(n) = f(n - 1) + f(n - 2), for n > 2. A. 2, 3, 5, 7, 9 B. 2, 3, 4, 7, 11 C. 2, 3, 5, 9, 11 D. 2, 3, 5, 8, 13
Ok, so we got a fibonacci here
You are already given the first two terms, \(a_1=2\) \(a_2=3\) I am changing my notation, mam, if you don't mind.... (do you?)
D
i dont mind and thnx zupari :)
You are given that: \(\large\color{black}{ \displaystyle a_n=a_{n-1}+a_{n-2} }\) (i.e. every Nth term is going to be equal (or given by) the sum of the 2 terms before it)
So, we can use this for 3rd, 4th and 5th terms
\(\large\color{black}{ \displaystyle a_3=a_{2}+a_{1}=3+2=5 }\)
\(\large\color{black}{ \displaystyle a_4=a_{3}+a_{2}=5+3=8 }\)
\(\large\color{black}{ \displaystyle a_5=a_{4}+a_{3}=8+5=13 }\)
lets look at it entirely. \(\large\color{black}{ \displaystyle 2,~3,~5,~8,~13 }\)
So can see just by looking how every term (from 3rd term and on) has a value same as the sum of the 3 terms before it)
Join our real-time social learning platform and learn together with your friends!