login
Expansion of (1-x)^2/((1-x)^3-3x^4).
0

%I #8 Aug 25 2023 18:50:05

%S 1,1,1,1,4,13,31,61,115,232,505,1117,2413,5089,10660,22477,47779,

%T 101833,216619,459568,974017,2065465,4383769,9307633,19759108,

%U 41934589,88985383,188834389,400758931,850562776,1805202073,3831179989

%N Expansion of (1-x)^2/((1-x)^3-3x^4).

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1,3).

%F G.f. : (1-2x+x^2)/(1-3x+3x^2-x^3-3x^4); a(n)=3a(n-1)-3a(n-2)+a(n-3)+3a(n-4); a(n)=sum{k=0..floor(n/3), binomial(n-k, 3k)3^k}.

%t CoefficientList[Series[(1-x)^2/((1-x)^3-3x^4),{x,0,40}],x] (* or *) LinearRecurrence[{3,-3,1,3},{1,1,1,1},40] (* _Harvey P. Dale_, Aug 25 2023 *)

%K easy,nonn

%O 0,5

%A _Paul Barry_, Jul 25 2004