How can I solve the following recurrence relation?
$f(n+1)=f(n)+f(n-1)+f(n-2), \ f(0)=f(1)=f(2)=1.$
I can use the characteristic equation which is $x^3=x^2+x+1$. It has three distinct roots $s,t,r$ therefore the general solution is $f(n)=as^n+bt^n+cr^n.$
You're almost done. All that remains is to find $a,b,c$.
Use the initial conditions to get a linear system for $a,b,c$.
You probably won't get nice numbers, because $s,t,r$ are not very nice (see WA).
On the other hand, the matrix in the linear system is a Vandermonde matrix and its inverse can be computed explicitly.