OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (18,-101,192,-108).
FORMULA
a(0)=1, a(1)=18, a(2)=223, a(3)=2388, a(n)=18*a(n-1)-101*a(n-2)+ 192*a(n-3)- 108*a(n-4) [From Harvey P. Dale, Jul 18 2011]
a(n)=(5*9^(n+3) - 14*6^(n+3) +30*2^(n+3) - 21)/840. [Yahia Kahloune, Jun 26 2013]
a(0)=1, a(1)=18; for n>1, a(n) = 15*a(n-1) -54* a(n-2) +2^n -1. - Vincenzo Librandi, Jul 08 2013
MATHEMATICA
LinearRecurrence[{18, -101, 192, -108}, {1, 18, 223, 2388}, 30] (* or *) CoefficientList[ Series[1 / ((1 - x) (1 - 2 x) (1 - 6 x) (1 - 9 x)), {x, 0, 30}], x] (* Harvey P. Dale, Jul 18 2011 *)
PROG
(Magma) m:=25; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-x)*(1-2*x)*(1-6*x)*(1-9*x)))); /* or */ I:=[1, 18, 223, 2388]; [n le 4 select I[n] else 18*Self(n-1)-101*Self(n-2)+192*Self(n-3)-108*Self(n-4): n in [1..25]]; // Vincenzo Librandi, Jul 08 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved