A145131 Expansion of x/((1 - x - x^4)*(1 - x)^2).
0, 1, 3, 6, 10, 16, 25, 38, 56, 81, 116, 165, 233, 327, 457, 637, 886, 1230, 1705, 2361, 3267, 4518, 6245, 8629, 11920, 16463, 22734, 31390, 43338, 59830, 82594, 114015, 157385, 217248, 299876, 413926, 571347, 788632, 1088546, 1502511, 2073898, 2862571
Offset: 0
Examples
a(7) = 38 = 3*25 -3*16 +10 +6 -2*3 +1.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1,1,-2,1).
Programs
-
Maple
col:= proc(k) local l, j, M, n; l:= `if` (k=0, [1, 0, 0, 1], [seq(coeff( -(1-x-x^4) *(1-x)^(k-1), x, j), j=1..k+3)]); M:= Matrix(nops(l), (i,j)-> if i=j-1 then 1 elif j=1 then l[i] else 0 fi); `if`(k=0, n->(M^n)[2,3], n->(M^n)[1,2]) end: a:= col(3): seq(a(n), n=0..40);
-
Mathematica
Series[x/((1-x-x^4)*(1-x)^2), {x, 0, 50}] // CoefficientList[#, x]& (* Jean-François Alcover, Feb 13 2014 *) LinearRecurrence[{3,-3,1,1,-2,1},{0,1,3,6,10,16},50] (* Harvey P. Dale, Aug 08 2015 *)
-
PARI
concat(0,Vec(1/(1-x-x^4)/(1-x)^2+O(x^99))) \\ Charles R Greathouse IV, Sep 25 2012
Formula
a(n) = 3a(n-1) -3a(n-2) +a(n-3) +a(n-4) -2a(n-5) +a(n-6).
Comments