A128543 a(n) = floor(2^(n-2)*3*n).
1, 6, 18, 48, 120, 288, 672, 1536, 3456, 7680, 16896, 36864, 79872, 172032, 368640, 786432, 1671168, 3538944, 7471104, 15728640, 33030144, 69206016, 144703488, 301989888, 629145600, 1308622848, 2717908992, 5637144576
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (4,-4).
Programs
-
GAP
Concatenation([1], List([2..40], n-> 3*n*2^(n-2))); # G. C. Greubel, Jul 11 2019
-
Haskell
a128543 = sum . a134239_row . subtract 1 -- Reinhard Zumkeller, Nov 15 2014
-
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
-
Mathematica
CoefficientList[Series[(1+2*x-2*x^2)/(1-2*x)^2,{x,0,40}],x] (* Vincenzo Librandi, Jun 28 2012 *)
-
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
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)
Extensions
Definition corrected by M. F. Hasler, Nov 05 2014
Comments