Q. If f(1)=2,f(2)=1 and f(n)=3f(n−1)+f(n−2) then find the value of f(6).Answer:
Initialize Recursive Formula: To find the value of f(6), we need to use the recursive formula f(n)=3f(n−1)+f(n−2) and the initial conditions f(1)=2 and f(2)=1. We will calculate the values of f(3), f(4), f(5), and then f(6) step by step.
Calculate f(3): First, we find f(3) using the recursive formula:f(3)=3f(2)+f(1)=3(1)+2=3+2=5.So, f(3)=5.
Calculate f(4): Next, we find f(4) using the recursive formula:f(4)=3f(3)+f(2)=3(5)+1=15+1=16.So, f(4)=16.
Calculate f(5): Then, we find f(5) using the recursive formula:f(5)=3f(4)+f(3)=3(16)+5=48+5=53.So, f(5)=53.
Calculate f(6): Finally, we find f(6) using the recursive formula:f(6)=3f(5)+f(4)=3(53)+16=159+16=175.So, f(6)=175.
More problems from Find the roots of factored polynomials