OFFSET
3,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 3..1002
Index entries for linear recurrences with constant coefficients, signature (3,-2,0,-1,1).
FORMULA
G.f.: x^3*(1+8*x+2*x^2-3*x^4)/((1-x)^2*(1-x-x^2-x^3)).
a(n) = A000213(n+3) -4*(n+1). - R. J. Mathar, Jun 24 2020
MAPLE
seq(coeff(series(x^4/((1+2*x)*(2*x^3+x^2-2*x+1)), x, n+1), x, n), n = 3..40); # G. C. Greubel, Nov 04 2019
MATHEMATICA
Drop[CoefficientList[Series[x^3*(1+8*x+2*x^2-3*x^4)/((1-x)^2*(1-x-x^2-x^3)), {x, 0, 40}], x], 3] (* or *) LinearRecurrence[{3, -2, 0, -1, 1}, {1, 11, 33, 77, 161}, 40] (* G. C. Greubel, Nov 04 2019 *)
PROG
(PARI) my(x='x+O('x^40)); Vec(x^3*(1+8*x+2*x^2-3*x^4)/((1-x)^2*(1-x-x^2-x^3))) \\ G. C. Greubel, Nov 04 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( x^3*(1+8*x+2*x^2-3*x^4)/((1-x)^2*(1-x-x^2-x^3)) )); // G. C. Greubel, Nov 04 2019
(Sage)
def A077952_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P(x^3*(1+8*x+2*x^2-3*x^4)/((1-x)^2*(1-x-x^2-x^3))).list()
a=A077952_list(40); a[3:] # G. C. Greubel, Nov 04 2019
(GAP) a:=[1, 11, 33, 77, 161];; for n in [6..30] do a[n]:=3*a[n-1]-2*a[n-2]-a[n-4] +a[n-5]; od; a; # G. C. Greubel, Nov 04 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved