OFFSET
0,2
COMMENTS
Row sums of triangle A131067. - 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) = 7*2^n - 6*(n + 1).
G.f.: (1 - 2*x + 7*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.: 7*exp(2*x) - 6*(1+x)*exp(x). - G. C. Greubel, Mar 12 2020
EXAMPLE
a(3) = 32 = sum of row 4 terms of triangle A131067: (1 + 15 + 15 + 1).
a(3) = 32 = (1, 3, 3, 1) dot (1, 1, 7, 7) = (1 + 3 + 21 + 7).
MAPLE
a := proc (n) options operator, arrow; 7*2^n-6*n-6 end proc: seq(a(n), n = 0 .. 30); # Emeric Deutsch, Jun 20 2007
MATHEMATICA
Table[7*2^n -6*(n+1), {n, 0, 30}] (* Vladimir Joseph Stephan Orlovsky, Nov 10 2008; modified by G. C. Greubel, Mar 12 2020 *)
CoefficientList[Series[(1-2x+7x^2)/((1-2x)(1-x)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 05 2012 *)
PROG
(Magma) I:=[1, 2, 10]; [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
(PARI) vector(31, n, my(m=n-1); 7*2^m -6*(m+1) ) \\ G. C. Greubel, Mar 12 2020
(Sage) [7*2^n -6*(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