OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (21,-131,291,-180).
FORMULA
a(0)=1, a(1)=21; for n>2, a(n) = 17*a(n-1) -60*a(n-2) +(3^n -1)/2. - Vincenzo Librandi, Jul 10 2013
a(0)=1, a(1)=21, a(2)=310, a(3)=4050; for n>3, a(n) = 21*a(n-1) -131*a(n-2) +291*a(n-3) -180*a(n-4). - Vincenzo Librandi, Jul 10 2013
a(n) = (1536*12^n - 1375*5^n + 462*3^n - 7)/616. - Christian Krause, Jun 07 2026
MATHEMATICA
CoefficientList[Series[1 / ((1 - x) (1 - 3 x) (1 - 5 x) (1 - 12 x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jul 10 2013 *)
(* Alternative: *)
LinearRecurrence[{21, -131, 291, -180}, {1, 21, 310, 4050}, 30] (* Harvey P. Dale, Sep 20 2016 *)
PROG
(Magma) m:=25; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-x)*(1-3*x)*(1-5*x)*(1-12*x)))); // Vincenzo Librandi, Jul 10 2013
(Magma) I:=[1, 21, 310, 4050]; [n le 4 select I[n] else 21*Self(n-1)-131*Self(n-2)+291*Self(n-3)-180*Self(n-4): n in [1..25]]; // Vincenzo Librandi, Jul 10 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
a(18)-a(21) from Christian Krause, Jun 07 2026
STATUS
approved
