OFFSET
0,4
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,-4,0,-1).
FORMULA
a(0)=a(1)=a(2)=1, a(n)*a(n+3) - a(n+1)*a(n+2) = -3.
a(n) = -4*a(n-2) - a(n-4) for n>3. - Colin Barker, Sep 07 2017
MATHEMATICA
a[ n_] := If[n<0, a[2-n], SeriesCoefficient[(1 + x + 5*x^2 + 2*x^3) / (1 + 4*x^2 + x^4), {x, 0, n}]]; (* Michael Somos, Sep 23 2024 *)
PROG
(PARI) Vec((1 + x + 5*x^2 + 2*x^3) / (1 + 4*x^2 + x^4) + O(x^40)) \\ Colin Barker, Sep 07 2017
(PARI) {a(n) = if(n<0, n=2-n); polcoeff( (1 + x + 5*x^2 + 2*x^3) / (1 + 4*x^2 + x^4) + x*O(x^n), n)}; /* Michael Somos, Sep 23 2024 */
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ralf Stephan, Jun 05 2005
STATUS
approved