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

%I #24 Sep 26 2023 12:12:18

%S 1,3,10,34,117,407,1429,5055,17986,64278,230473,828391,2982825,

%T 10754459,38811802,140165322,506449789,1830590295,6618524221,

%U 23933966743,86562282258,313102489406,1132598701585,4097213146599,14822370816337,53623952036787

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

%C A diagonal of the square array A217770.

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

%F G.f.: (1-5*x+7*x^2-3*x^3)/(1-8*x+21*x^2-20*x^3+5*x^4).

%F a(n) = A081567(n) - A094865(n).

%F a(n) = A217770(n+1,n).

%F a(n) = 8*a(n-1) -21*a(n-2) +20*a(n-3) -5*a(n-4) for n>3, a(0)=1, a(1)=3, a(2)=10, a(3)=34.

%F a(n) = ((3+r)*(5+r)^n-(3-r)*(5-r)^n+(1+r)*(3+r)^n-(1-r)*(3-r)^n)/(4*r*2^n), where r=sqrt(5). [_Bruno Berselli_, Mar 28 2013]

%t LinearRecurrence[{8, -21, 20, -5}, {1, 3, 10, 34}, 26] (* _Bruno Berselli_, Mar 28 2013 *)

%t CoefficientList[Series[(1-x)^2(1-3x)/((1-3x+x^2)(1-5x+5x^2)),{x,0,30}],x] (* _Harvey P. Dale_, Sep 26 2023 *)

%o (Magma) m:=26; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x)^2*(1-3*x)/((1-3*x+x^2)*(1-5*x+5*x^2)))); // _Bruno Berselli_, Mar 28 2013

%o (Maxima) makelist(expand(((3+sqrt(5))*(5+sqrt(5))^n-(3-sqrt(5))*(5-sqrt(5))^n+(1+sqrt(5))*(3+sqrt(5))^n-(1-sqrt(5))*(3-sqrt(5))^n)/(4*2^n*sqrt(5))), n, 0, 25); /* _Bruno Berselli_, Mar 28 2013 */

%Y Cf. A217770.

%K nonn,easy

%O 0,2

%A _Philippe Deléham_, Mar 24 2013