OFFSET
0,9
COMMENTS
a(n) is the constant term of the canonical representative (polynomial of degree < 5) of x^n (mod x^5-x^3-2*x^2+1), see example.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,1,2,0,-1).
FORMULA
G.f.: sum( a(k) x^k, k=0...oo ) = (1 - x^2 - 2*x^3)/(1 - x^2 - 2*x^3 + x^5)
EXAMPLE
x^6 = x^4 + 2*x^3 - x (mod x^5 - x^3 - 2*x^2 + 1), and the l.h.s. has no constant term, so a(6) = 0.
x^14 = 14*x^4 + 26*x^3 + 22*x^2 - 9*x - 13 (mod x^5 - x^3 - 2*x^2 + 1), and the constant term on the r.h.s. is a(14) = -13.
MATHEMATICA
LinearRecurrence[{0, 1, 2, 0, -1}, {1, 0, 0, 0, 0}, 50] (* Harvey P. Dale, Sep 21 2024 *)
PROG
(PARI) a(n) = polcoeff( lift( Mod( x, x^5-x^3-2*x^2+1)^n), 0)
CROSSREFS
KEYWORD
easy,sign
AUTHOR
M. F. Hasler, Nov 04 2010
STATUS
approved