OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (16,-79,120).
FORMULA
From Vincenzo Librandi, Jun 27 2013: (Start)
a(n) = 16*a(n-1) - 79*a(n-2) + 120*a(n-3).
a(n) = 13*a(n-1) - 40*a(n-2) + 3^n. (End)
a(n) = (2^(7+3*n) + 3^(3+n) - 5^(3+n))/30. - Bruno Berselli, Jun 27 2013
E.g.f.: (27*exp(3*x) - 125*exp(5*x) + 128*exp(8*x))/30. - G. C. Greubel, Oct 29 2019
MAPLE
seq((2^(7+3*n) + 3^(3+n) - 5^(3+n))/30, n=0..30); # G. C. Greubel, Oct 29 2019
MATHEMATICA
CoefficientList[Series[1/((1-3x)(1-5x)(1-8x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jun 27 2013 *)
LinearRecurrence[{16, -79, 120}, {1, 16, 177}, 30] (* Harvey P. Dale, Aug 30 2016 *)
PROG
(Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-3*x)*(1-5*x)*(1-8*x)))); /* or */ I:=[1, 16, 177]; [n le 3 select I[n] else 16*Self(n-1)-79*Self(n-2)+120*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Jun 27 2013
(Magma) [(2^(7+3*n) + 3^(3+n) - 5^(3+n))/30: n in [0..30]]; // G. C. Greubel, Oct 29 2019
(PARI) vector(31, n, (2^(4+3*n) + 3^(2+n) - 5^(2+n))/30) \\ G. C. Greubel, Oct 29 2019
(Sage) [(2^(7+3*n) + 3^(3+n) - 5^(3+n))/30 for n in (0..30)] # G. C. Greubel, Oct 29 2019
(GAP) List([0..30], n-> (2^(7+3*n) + 3^(3+n) - 5^(3+n))/30); # G. C. Greubel, Oct 29 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved