%I #16 Sep 08 2022 08:44:43
%S 1,21,315,4185,52731,648081,7869555,94992345,1143260811,13739265441,
%T 164992058595,1980630120105,23771914474491,285289093487601,
%U 3423625845396435,41084450500377465,493019048181297771
%N Expansion of 1/((1-3x)(1-6x)(1-12x)).
%H Vincenzo Librandi, <a href="/A017954/b017954.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 (21,-126,216).
%F a(0)=1, a(1)=21, a(2)=315; for n>2, a(n) = 21*a(n-1) -126*a(n-2) +216*a(n-3). - _Vincenzo Librandi_, Jul 02 2013
%F a(n) = 18*a(n-1) -72*a(n-2) +3^n. - _Vincenzo Librandi_, Jul 02 2013
%F a(n) = (12^(n+2) - 3*6^(n+2) + 2*3^(n+2))/54. [_Yahia Kahloune_, Jul 06 2013]
%t CoefficientList[Series[1 / ((1 - 3 x) (1 - 6 x) (1 - 12 x)), {x, 0, 30}], x] (* _Vincenzo Librandi_, Jul 02 2013 *)
%t LinearRecurrence[{21,-126,216},{1,21,315},30] (* _Harvey P. Dale_, Sep 21 2019 *)
%o (Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-3*x)*(1-6*x)*(1-12*x)))); /* or */ I:=[1, 21, 315]; [n le 3 select I[n] else 21*Self(n-1)-126*Self(n-2)+216*Self(n-3): n in [1..20]]; // _Vincenzo Librandi_, Jul 02 2013
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_.