Generate the first 5 terms of this sequence: f(1) = 0 and f(2) = 1, f(n) = f(n - 1) + f(n - 2), for n > 2. 0, -1, 1, 0, 2 0, 1, 1, 2, 3 0, 1, 2, 2, 3 0, 1, 1, 2, 2
i dont understand how to solve this.
f(1) = 0 and f(2) = 1 are given keep this in mind
those are the first two terms the third term is... f(n) = f(n - 1) + f(n - 2) f(3) = f(3 - 1) + f(3 - 2) ... replace EVERY n with 3 (third term is when n = 3) f(3) = f(2) + f(1) f(3) = 1 + f(1) ... replace f(2) with 1, because f(2) = 1 (given) f(3) = 1 + 0 ... replace f(1) with 0, because f(1) = 0 (given) f(3) = 1 So the third term is 1. The sequence so far is: 0, 1, 1
Using this idea, what is f(4) ?
it would be 2
good
so it would be B then
f(5) = ??
it would be 3
and correct, the final answer is B
yep f(5) = 3
short way to summarize this rule: to get any term, just add the previous two terms
thank you that helped I'm put it in my notes
you're welcome
Join our real-time social learning platform and learn together with your friends!