OFFSET
1,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1001
Index entries for linear recurrences with constant coefficients, signature (2,0,0,-1,0,-1).
FORMULA
a(n) = 2*a(n-1) - a(n-4) - a(n-6).
G.f.: -x^2*(x^4+2*x^3-x^2+x-1)/((x^3-x^2+2*x-1)*(x^3+x^2-1)). - Colin Barker, Nov 23 2012
MAPLE
seq(coeff(series((-x^2*(x^4+2*x^3-x^2+x-1))/((x^3-x^2+2*x-1)*(x^3+x^2-1)), x, n+1), x, n), n = 1 .. 40); # Muniru A Asiru, Jan 03 2019
MATHEMATICA
(See A192812.)
LinearRecurrence[{2, 0, 0, -1, 0, -1}, {0, 1, 1, 3, 4, 6}, 40] (* G. C. Greubel, Jan 03 2019 *)
PROG
(PARI) my(x='x+O('x^40)); concat([0], Vec(x^2*(1-x+x^2-2*x^3-x^4)/((1-x^2-x^3)*(1-2*x+x^2-x^3)))) \\ G. C. Greubel, Jan 03 2019
(Magma) m:=40; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( x^2*(1-x+x^2-2*x^3-x^4)/((1-x^2-x^3)*(1-2*x+x^2-x^3)) )); // G. C. Greubel, Jan 03 2019
(Sage) a=(x^2*(1-x+x^2-2*x^3-x^4)/((1-x^2-x^3)*(1-2*x+x^2-x^3)) ).series(x, 40).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Jan 03 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 10 2011
STATUS
approved