A137229 Expansion of g.f. x/((1-x)*(1-3*x+2*x^2-x^3)).
1, 4, 11, 27, 64, 150, 350, 815, 1896, 4409, 10251, 23832, 55404, 128800, 299425, 696080, 1618191, 3761839, 8745216, 20330162, 47261894, 109870575, 255418100, 593775045, 1380359511, 3208946544, 7459895656, 17342153392, 40315615409, 93722435100, 217878227875
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Richard Choulet, Curtz-like transformation.
- Index entries for linear recurrences with constant coefficients, signature (4,-5,3,-1).
Programs
-
Magma
I:=[1,4,11,27]; [n le 4 select I[n] else 4*Self(n-1) -5*Self(n-2) +3*Self(n-3) -Self(n-4): n in [1..40]]; // G. C. Greubel, Apr 17 2021
-
Maple
a:= n-> (<<3|1|0|0>, <-2|0|1|0>, <1|0|0|0>, <1|0|0|1>>^n)[4, 1]: seq(a(n), n=1..50); # Alois P. Heinz, Jul 24 2008
-
Mathematica
LinearRecurrence[{4,-5,3,-1},{1,4,11,27},40] (* Harvey P. Dale, Nov 10 2014 *)
-
Sage
def A137229_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( x/((1-x)*(1-3*x+2*x^2-x^3)) ).list() a=A137229_list(41); a[1:] # G. C. Greubel, Apr 17 2021
Formula
O.g.f: x/((1-x)*(1 -3*x +2*x^2 -x^3)).
a(n) = term (4,1) in the 4x4 matrix [3,1,0,0; -2,0,1,0; 1,0,0,0; 1,0,0,1]^(n). - Alois P. Heinz, Jul 24 2008
Extensions
New name using g.f., Joerg Arndt, Apr 18 2021
Comments