Generate the first 5 terms of this sequence: f(1) = 1 and f(2) = 2, f(n) = f(n - 1) + f(n - 2), for n > 2. (a) 1, 2, 3, 4, 5 (b) 1, 2, 3, 5, 7 (c) 1, 2, 3, 5, 8 (d) 1, 3, 5, 7, 9 If you could just help understand how to set up the problem and solve it, that would be great. :)
A warm Welcome to OpenStudy. I can help guide you through this useful site. You can ask your questions to me or you can message me. Please use the chat for off topic questions. Remember to give the person who helped you a medal by clicking on "Best Answer". We follow a code of conduct, ( http://openstudy.com/code-of-conduct ). Please take a moment to read it.
find: f(1), f(2), f(3), f(4), f(5) they give you the first 2, and a formula to develop the others
f(n) = f(n - 1) + f(n - 2), for n > 2, so n starts at 3 f(3) = f(3 - 1) + f(3 - 2) = f(2) + f(1) , and those values we are given f(4) = f(4 - 1) + f(4 - 2) = f(3) + f(2), we know f(2) from the start, and already found f(3) f(5) amounts to f(4) + f(3) which would both have already been determined
@amistre64 So where I see the "n" I plug in the next number in the sequence? For 3, f(n) = f(n - 1) + f(n - 2) becomes f(3) = f(3 - 1) + f(3 - 2)? Am I on the right track?
that is correct
Okay thanks! I think I've got it from here.
;) good luck
Join our real-time social learning platform and learn together with your friends!