login
Expansion of (1+4*x+8*x^2-x^3)/((1-x)*(1+x)*(1-3*x^2)).
1

%I #17 Sep 08 2022 08:46:04

%S 1,4,12,15,45,48,144,147,441,444,1332,1335,4005,4008,12024,12027,

%T 36081,36084,108252,108255,324765,324768,974304,974307,2922921,

%U 2922924,8768772,8768775,26306325,26306328,78918984,78918987,236756961,236756964,710270892,710270895

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

%C A row of the square array A219605.

%H G. C. Greubel, <a href="/A224785/b224785.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(n) = a(n-1) + 3 if n odd.

%F a(n) = 3*a(n-1) if n even.

%F a(2n) = (11*3^n - 9)/2.

%F a(2n+1) = (11*3^n - 3)/2.

%F a(n) = 4*a(n-2) - 3*a(n-4) with n>3, a(0)=1, a(1)=4, a(2)=12, a(3)=15.

%F a(n) = A219605(3,n).

%F a(n) = Sum_{k=0..n} A220354(n,k) * 3^k.

%F a(n) = (11*3^floor(n/2)-3(-1)^n)/2 -3. - _Bruno Berselli_, Apr 27 2013

%p seq( (11*3^floor(n/2) -3*(2+(-1)^n))/2, n=0..40); # _G. C. Greubel_, Nov 12 2019

%t Table[(11*3^Floor[n/2] -3*(2+(-1)^n))/2, {n,0,40}] (* _G. C. Greubel_, Nov 12 2019 *)

%o (PARI) vector(41, n, (11*3^((n-1)\2) -3*(2-(-1)^n))/2) \\ _G. C. Greubel_, Nov 12 2019

%o (Magma) [(11*3^Floor(n/2) -3*(2+(-1)^n))/2: n in [0..40]]; // _G. C. Greubel_, Nov 12 2019

%o (Sage) [(11*3^floor(n/2) -3*(2+(-1)^n))/2 for n in (0..40)] # _G. C. Greubel_, Nov 12 2019

%o (GAP) List([0..40], n-> (11*3^Int(n/2) -3*(2+(-1)^n))/2 ); # _G. C. Greubel_, Nov 12 2019

%Y Cf. A219605, A220354.

%K nonn,easy

%O 0,2

%A _Philippe Deléham_, Apr 17 2013