f(1) = 2 and f(2) = 3, f(n) = f(1) + f(2) + f(n - 1), for n > 2. f(5) = ______
I got 5 + f(4)
How'd you get your answer?
Substitute n=5 in the equation f(n)=f(1) +f(2)+f(5-1)
We already know what f(1) and f(2) are.. Is it right?
Ohhh ok! I get it now! Thank you so much! :)
No problem!! :) Best of luck!!
thats not correct, we can get a numerical answer for this
start by finding f(3)
How?
Oh yeah! That's true!!
Substitute f(3) in the equation I showed you. where n=3.
to get f(3), just replace every 'n' by 3 in f(n) = f(1) + f(2) + f(n - 1)
Ohhhh.
so what u get f(3) as ?
I got 5.. I don't think it's right...
how did u get 5 ?
f(n) = f(1) + f(2) + f(n - 1) f(3) = f(1)+f(2)+f(2) you know all values on right
f(3)= 2+3+3=8 and use this to find f(4) the same way as hartnn mentioned f|(4)=f(1)+f(2)+f(3) and finally use it again to find f(5)
Join our real-time social learning platform and learn together with your friends!