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