A191830 Expansion of x^2*(2-3*x)/(1-x-x^2)^2.
0, 0, 2, 1, 4, 5, 10, 16, 28, 47, 80, 135, 228, 384, 646, 1085, 1820, 3049, 5102, 8528, 14240, 23755, 39592, 65931, 109704, 182400, 303050, 503161, 834868, 1384397, 2294290, 3800080, 6290788, 10408679, 17213696, 28454415, 47014380, 77647104, 128186062
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (2,1,-2,-1).
Programs
-
Maple
A191830:= proc(n) option remember: if n<=1 then 0 else procname(n-1)+procname(n-2)+A000045(n-5) fi: end proc: with(combinat): A000045:=fibonacci: seq(A191830(n),n=0..30); # Johannes W. Meijer, Jun 27 2011
-
Mathematica
CoefficientList[Series[x^2(2-3x)/(1-x-x^2)^2,{x,0,40}],x] (* or *) LinearRecurrence[{2,1,-2,-1},{0,0,2,1},40] (* Harvey P. Dale, Mar 16 2015 *)
-
PARI
a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,-2,1,2]^n*[0;0;2;1])[1,1] \\ Charles R Greathouse IV, Jul 06 2017
Formula
G.f.: x^2*(2-3*x)/(1-x-x^2)^2.
a(n) = a(n-1) + a(n-2) + A000045(n-5), a(0) = a(1) = 0.
a(0)=0, a(1)=0, a(2)=2, a(3)=1, a(n)=2*a(n-1)+a(n-2)-2*a(n-3)-a(n-4). - Harvey P. Dale, Mar 16 2015
Comments