OFFSET
1,1
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
a(n) = 4*A173773(n).
a(n) = 2*a(n-3) - a(n-6). - Colin Barker, Oct 15 2014
G.f.: 4*x*(x+1)*(2*x^4 - x^3 + 7*x^2 - x + 2) / ((x-1)^2*(x^2 + x + 1)^2). - Colin Barker, Oct 15 2014
EXAMPLE
a(1) = 5 - (-3) = 8, a(2) = 3 - (-1) = 4, a(3) = 21 - (-3) = 24.
MAPLE
a:= LREtools[REtoproc](f(n) = 2*f(n-3)-f(n-6), f(n), zip((s, t)->f(s)=t, [$1..6], [8, 4, 24, 40, 12, 56]), remember):
seq(a(n), n=1..100); # Robert Israel, Oct 15 2014
MATHEMATICA
Rest[CoefficientList[Series[4*x*(x+1)*(2*x^4-x^3+7*x^2-x+2)/((x-1)^2*(x^2 +x+1)^2), {x, 0, 50}], x]] (* G. C. Greubel, Sep 20 2018 *)
PROG
(PARI) Vec(4*x*(x+1)*(2*x^4-x^3+7*x^2-x+2)/((x-1)^2*(x^2+x+1)^2) + O(x^100)) \\ Colin Barker, Oct 15 2014
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(4*x*(x+1)*(2*x^4-x^3+7*x^2-x+2)/((x-1)^2*(x^2+x+1)^2))); // G. C. Greubel, Sep 20 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 26 2010
EXTENSIONS
More terms from Colin Barker, Oct 15 2014
STATUS
approved