login
Expansion of 1/((1-3x)(1-6x)(1-7x)).
1

%I #26 May 31 2025 11:34:19

%S 1,16,175,1630,13921,112756,881875,6730810,50468341,373414096,

%T 2734771975,19868820790,143434778761,1030163245036,7367866260475,

%U 52515419443570,373250112873181,2646603979861576,18729347384947375,132324150012391150,933581363480079601

%N Expansion of 1/((1-3x)(1-6x)(1-7x)).

%H Vincenzo Librandi, <a href="/A017931/b017931.txt">Table of n, a(n) for n = 0..200</a>

%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (16,-81,126).

%F a(0)=1, a(1)=16, a(2)=175; for n>2, a(n) = 16*a(n-1) -81*a(n-2) +126*a(n-3). - _Vincenzo Librandi_, Jul 02 2013

%F a(n) = 13*a(n-1) -42*a(n-2) +3^n. - _Vincenzo Librandi_, Jul 02 2013

%F a(n) = (3*7^(n+2) - 4*6^(n+2) + 3^(n+2))/12. - _Yahia Kahloune_, Jul 06 2013

%p a:= n-> (Matrix(3, (i, j)-> `if`(i=j-1, 1, `if`(j=1, [16, -81, 126][i], 0)))^n)[1, 1]: seq(a(n), n=0..25); # _Alois P. Heinz_, Jul 02 2013

%t CoefficientList[Series[1 / ((1 - 3 x) (1 - 6 x) (1 - 7 x)), {x, 0, 30}], x] (* _Vincenzo Librandi_, Jul 02 2013 *)

%t LinearRecurrence[{16,-81,126},{1,16,175},30] (* _Harvey P. Dale_, May 31 2025 *)

%o (Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-3*x)*(1-6*x)*(1-7*x)))); // _Vincenzo Librandi_, Jul 02 2013

%o (Magma) I:=[1, 16, 175]; [n le 3 select I[n] else 16*Self(n-1)-81*Self(n-2)+126*Self(n-3): n in [1..20]]; // _Vincenzo Librandi_, Jul 02 2013

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_