If the initial state is $b_0,b_1,\dots,b_{k-1}$ and the recurrence relation is $b_k = \sum_{i = 0}^{k-1} a_ib_i$, then in linear-algebraic terms we have
$$ \begin{pmatrix}
b_1 \\ b_2 \\ \vdots \\ b_k
\end{pmatrix} = U \begin{pmatrix}
b_0 \\ b_1 \\ \vdots \\ b_{k-1}
\end{pmatrix}, $$
and more generally
$$ \begin{pmatrix}
b_{n} \\ b_{n+1} \\ \vdots \\ b_{n+k-1}
\end{pmatrix} = U^n \begin{pmatrix}
b_0 \\ b_1 \\ \vdots \\ b_{k-1}
\end{pmatrix}, $$
where of course
$$ U = \begin{pmatrix}
0 & 1 & 0 & \cdots & 0 \\
0 & 0 & 1 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
0 & 0 & 0 & \cdots & 1 \\
a_0 & a_1 & a_2 & \cdots & a_{k-1}
\end{pmatrix}. $$
And $U^n$ can be computed efficiently by standard exponentiation algorithms.