Let $\lambda$ the positive root of the equation $t^2-1998t-1=0$. It is defined the sequence $x_0,x_1,x_2,\ldots,x_n,\ldots$ by $x_0=1,\ x_{n+1}=\lfloor\lambda{x_n}\rfloor\mbox{ for }n=1,2\ldots$ Find the remainder of the division of $x_{1998}$ by $1998$. Note: $\lfloor{x}\rfloor$ is the greatest integer less than or equal to $x$.
Problem
Source: Spanish Communities
Tags: floor function, modular arithmetic, algebra solved, algebra