A107851 Expansion of g.f. x*(-1-x-3*x^2-x^3+2*x^5)/((2*x^3+x^2-1)*(x^4+1)).
0, 1, 1, 4, 4, 5, 9, 10, 18, 29, 41, 68, 100, 149, 233, 346, 530, 813, 1225, 1876, 2852, 4325, 6601, 10026, 15250, 23229, 35305, 53732, 81764, 124341, 189225, 287866, 437906, 666317, 1013641, 1542132, 2346276, 3569413, 5430537, 8261962, 12569362
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1,2,-1,0,1,2).
Programs
-
Mathematica
CoefficientList[Series[x(-1-x-3x^2-x^3+2x^5)/((2x^3+x^2-1)(x^4+1)), {x,0,50}],x] (* or *) LinearRecurrence[{0,1,2,-1,0,1,2},{0,1,1,4,4,5,9},51] (* Harvey P. Dale, Jul 19 2011 *)
-
PARI
a(n)=([0,1,0,0,0,0,0; 0,0,1,0,0,0,0; 0,0,0,1,0,0,0; 0,0,0,0,1,0,0; 0,0,0,0,0,1,0; 0,0,0,0,0,0,1; 2,1,0,-1,2,1,0]^n*[0;1;1;4;4;5;9])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
Formula
a(0)=0, a(1)=1, a(2)=1, a(3)=4, a(4)=4, a(5)=5, a(6)=9, a(n)= a(n-2)+ 2*a(n-3)-a(n-4)+a(n-6)+2*a(n-7). - Harvey P. Dale, Jul 19 2011
Comments