OFFSET
1,2
COMMENTS
Also row sums of triangle A249111. - Reinhard Zumkeller, Nov 15 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-4).
FORMULA
Binomial transform of A007310 (assuming offset 0 in both sequences).
Row sums of triangle A134239. - Gary W. Adamson, Oct 14 2007
a(n) = 3*n*2^(n-2) for n>1. - R. J. Mathar, Oct 25 2011
From Colin Barker, Mar 22 2012: (Start)
a(n) = 4*a(n-1) - 4*a(n-2) for n>3.
G.f.: x*(1+2*x-2*x^2)/(1-2*x)^2. (End)
MATHEMATICA
CoefficientList[Series[(1+2*x-2*x^2)/(1-2*x)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Jun 28 2012 *)
PROG
(Magma) I:=[1, 6, 18]; [n le 3 select I[n] else 4*Self(n-1)-4*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jun 28 2012
(Haskell)
a128543 = sum . a134239_row . subtract 1
-- Reinhard Zumkeller, Nov 15 2014
(PARI) a(n)=3*n*2^n\4 \\ Charles R Greathouse IV, Oct 07 2015
(Sage) [1]+[3*n*2^(n-2) for n in (2..40)] # G. C. Greubel, Jul 11 2019
(GAP) Concatenation([1], List([2..40], n-> 3*n*2^(n-2))); # G. C. Greubel, Jul 11 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Mar 10 2007
EXTENSIONS
Definition corrected by M. F. Hasler, Nov 05 2014
STATUS
approved