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

%I #19 Oct 11 2021 08:46:42

%S 1,1,1,6,21,51,126,351,981,2646,7101,19251,52326,141831,384021,

%T 1040526,2820501,7644051,20713806,56132271,152119701,412245126,

%U 1117169901,3027492531,8204438646,22233857751,60253212501,163284696126

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

%H Seiichi Manyama, <a href="/A097124/b097124.txt">Table of n, a(n) for n = 0..1000</a>

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

%F G.f.: (1-2*x+x^2)/(1-3*x+3*x^2-6*x^3).

%F a(n) = 3*a(n-1)-3*a(n-2)+6*a(n-3).

%F a(n) = Sum{k=0..floor(n/3)} binomial(n, 3k)*5^k.

%t Round@Table[((1 + 5^(1/3))^n + 2 (1 - 5^(1/3) + 5^(2/3))^(n/2) Cos[n/2 ArcCos[-(1 + 5^(2/3))/4]])/3, {n, 0, 20}] (* _Vladimir Reshetnikov_, Sep 19 2016 *)

%t LinearRecurrence[{3, -3, 6}, {1, 1, 1}, 30] (* _Vincenzo Librandi_, Sep 20 2016 *)

%o (PARI) Vec((1-2*x+x^2)/(1-3*x+3*x^2-6*x^3) + O(x^40)) \\ _Michel Marcus_, Sep 20 2016

%K easy,nonn

%O 0,4

%A _Paul Barry_, Jul 25 2004