login
A027054
a(n) = T(n, n+3), T given by A027052.
2
1, 8, 23, 52, 107, 210, 401, 754, 1405, 2604, 4811, 8872, 16343, 30086, 55365, 101862, 187385, 344688, 634015, 1166172, 2144963, 3945242, 7256473, 13346778, 24548597, 45151956, 83047443, 152748112, 280947631, 516743310
OFFSET
3,2
FORMULA
From Colin Barker, Feb 19 2016: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-4) + a(n-5) for n>6.
G.f.: x^3*(1+5*x+x^2-x^3-2*x^4)/((1-x)^2*(1-x-x^2-x^3)). (End)
a(n) = A001590(n+4) -2*n -4, n>=3. - R. J. Mathar, Jun 15 2020
MAPLE
seq(coeff(series(x^3*(1+5*x+x^2-x^3-2*x^4)/((1-x)^2*(1-x-x^2-x^3)), x, n+1), x, n), n = 3..33); # G. C. Greubel, Nov 05 2019
MATHEMATICA
LinearRecurrence[{3, -2, 0, -1, 1}, {1, 8, 23, 52, 107}, 30] (* G. C. Greubel, Nov 05 2019 *)
PROG
(PARI) my(x='x+O('x^33)); Vec( x^3*(1+5*x+x^2-x^3-2*x^4)/((1-x)^2*(1-x-x^2-x^3)) ) \\ G. C. Greubel, Nov 05 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 33); Coefficients(R!( x^3*(1+5*x+x^2-x^3-2*x^4)/((1-x)^2*(1-x-x^2-x^3)) )); // G. C. Greubel, Nov 05 2019
(Sage)
def A027053_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( x^3*(1+5*x+x^2-x^3-2*x^4)/((1-x)^2*(1-x-x^2-x^3)) ).list()
a=A027053_list(33); a[3:] # G. C. Greubel, Nov 05 2019
(GAP) a:=[1, 8, 23, 52, 107];; for n in [6..33] do a[n]:=3*a[n-1]-2*a[n-2] -a[n-4]+a[n-5]; od; a; # G. C. Greubel, Nov 05 2019
CROSSREFS
Sequence in context: A225280 A218711 A270694 * A372674 A358246 A048467
KEYWORD
nonn,easy
STATUS
approved