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,-128,252,-144).
FORMULA
a(n) = (2*12^(n+3) - 11*6^(n+3) + 33*2^(n+3) - 24)/1320. - Yahia Kahloune, May 19 2013
a(0)=1, a(1)=21, a(2)=313, a(3)=4137; for n>3, a(n) = 21*a(n-1) -128*a(n-2) +252*a(n-3)-144*a(n-4). - Vincenzo Librandi, Jul 08 2013
a(0)=1, a(1)=21; for n>1, a(n) = 18*a(n-1) -72*a(n-2) +2^n -1. - Vincenzo Librandi, Jul 08 2013
MATHEMATICA
CoefficientList[Series[1 / ((1 - x) (1 - 2 x) (1 - 6 x) (1 - 12 x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jul 08 2013 *)
LinearRecurrence[{21, -128, 252, -144}, {1, 21, 313, 4137}, 30] (* Harvey P. Dale, Mar 07 2015 *)
PROG
(Magma) I:=[1, 21, 313, 4137]; [n le 4 select I[n] else 21*Self(n-1)-128*Self(n-2)+252*Self(n-3)-144*Self(n-4): n in [1..25]]; /* or */ I:=[1, 21]; [n le 2 select I[n] else 18*Self(n-1)-72*Self(n-2)+2^n-1: n in [1..20]]; // Vincenzo Librandi, Jul 08 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved