Find f(5) for this sequence: f(1) = 2 and f(2) = 4, f(n) = f(1) + f(2) + f(n - 1), for n > 2. f(5) = ______
ok so what is the first two terms of the sum? ? + ? + ?
i have no idea
the first two terms are f(1) + f(2) so what are they?
ok heres a hint because there is a lot more to the problem
the first two terms are 2 + 4
they are given to you
now the third term is tricky, f(n-1) , that is recursive, so it will create several terms in the final sum
are you with me so far, we have 2 + 4 + f(n-1)
yes i am (:
ok so now lets ignore the 2+4 for a minute and focus on f(n-1)
so what is n?
2 + 4 + f(n-1) = f(n)=-6?
no, what is n?
f(n), we have f(5) so what is n?
just match the pattern you see given f(n) and f(5)
the f is the same but the other part is different
ok another hint, n = 5
ok so f(5) = f(1) + f(2) + f(n - 1) we already know f(1) and f(2) so we can write as 2 + 4 + f(n - 1) but we also know n so we can write as 2 + 4 + f(5 -1) if we subtract one from the 5 we have f(5) = 2 + 4 + f(4)
now you need to find f(4), which starts 1 + 2 +...
Directly substitute n = 5 into the formula. f(5) = f(1) + f(2) + f(4) .. We know f(1) = 2, and f(2) = 4 so f(5) = 2 + 4 + f(4) = 6 + f(4). Now determine f(4) . . . f(4) = f(1) + f(2) + f(3) = 6 + f(3)... so.. f(5) = 6 + (6 + f(3) ) = 12 + f(3) right?
you got the idea, yep
so it will be some positive number
f(5) = 6+16 f(5) = 22
?
sounds good to me
thanks you so much could you help me with one more?
sure, by the way u see that pattern was 6*(n-2) + f(2) or 6*(n-2) + 4 is the general solution for any n
yes i did (:
ok perfect, u understand this very well
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 yeah slightly more complex but exact same idea, i recommend starting brute force like we did before until you see a general pattern, unless you can just see the pattern right away
you already know the first two terms which is nice, so you just need f(3), f(4), and f(5)
so just plug and chug
C?
no i dont think so
so whats f(3)
aka the third term
ohhh i new at is D 2, 3, 5, 8, 13
yeah i beleive thats correct
thanks again for you time & help!!!(:
yw :)
Join our real-time social learning platform and learn together with your friends!