Q. If f(1)=0,f(2)=1 and f(n)=3f(n−1)+3f(n−2) then find the value of f(6).Answer:
Given initial conditions: We are given the initial conditions f(1)=0 and f(2)=1. We need to use the recursive formula f(n)=3f(n−1)+3f(n−2) to find f(3).
Calculate f(3): Using the recursive formula, we calculate f(3)=3f(2)+3f(1)=3×1+3×0=3.
Find f(4): Next, we find f(4) using the recursive formula: f(4)=3f(3)+3f(2)=3×3+3×1=9+3=12.
Continue with f(5): We continue with the recursive formula to find f(5): f(5)=3f(4)+3f(3)=3×12+3×3=36+9=45.
Use recursive formula for f(6): Finally, we use the recursive formula to find f(6): f(6)=3f(5)+3f(4)=3×45+3×12=135+36=171.
More problems from Find the roots of factored polynomials