OFFSET
0,2
COMMENTS
Row sums of triangle A131063. - Emeric Deutsch, Jun 20 2007
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
FORMULA
From Emeric Deutsch, Jun 20 2007: (Start)
a(n) = 5*2^n - 4*(n + 1).
G.f.: (1-2*x+5*x^2)/((1-2*x)*(1-x)^2). (End)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). - Vincenzo Librandi, Jul 05 2012
E.g.f.: 5*exp(2*x) - 4*(1+x)*exp(x). - G. C. Greubel, Mar 12 2020
EXAMPLE
a(3) = 24 = sum of row 4 terms of A131063: (1 + 11 + 11 + 1).
a(3) = 24 = (1, 3, 3, 1) dot (1, 1, 5, 5).
MAPLE
a := proc (n) options operator, arrow; 5*2^n-4*n-4 end proc: seq(a(n), n = 0 .. 30); # Emeric Deutsch, Jun 20 2007
MATHEMATICA
CoefficientList[Series[(1-2x+5x^2)/((1-2x)(1-x)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 05 2012 *)
LinearRecurrence[{4, -5, 2}, {1, 2, 8}, 30] (* Harvey P. Dale, Dec 29 2014 *)
PROG
(Magma) I:=[1, 2, 8]; [n le 3 select I[n] else 4*Self(n-1)-5*Self(n-2) + 2*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jul 05 2012
(GAP) Print(List([0..30], n->5*2^n-4*n-4)); # Muniru A Asiru, Feb 21 2019
(Sage) [5*2^n -4*(n+1) for n in (0..30)] # G. C. Greubel, Mar 12 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jun 13 2007
EXTENSIONS
Corrected and extended by Emeric Deutsch, Jun 20 2007
STATUS
approved