linrec(coeffs, init, n) evaluates the n-th term of the sequence with
a(n) = coeffs[1] a(n - 1) + ... + coeffs[k] a(n - k) and initial terms
init (padded with zeros), by SymPy's square and reduce method in
O(k^2 log n) operations. Coefficients and initial terms may be symbolic.