%I #23 Sep 08 2022 08:45:11
%S 1,3,9,24,60,144,336,768,1728,3840,8448,18432,39936,86016,184320,
%T 393216,835584,1769472,3735552,7864320,16515072,34603008,72351744,
%U 150994944,314572800,654311424,1358954496,2818572288,5838471168,12079595520
%N Binomial transform of A001651.
%C a(n+1)/3 = A001792(n).
%H Vincenzo Librandi, <a href="/A084858/b084858.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec"order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-4).
%F G.f.: (x^2 - x + 1)/(1-2*x)^2.
%F a(n) = 3*(0^n/3 + 2^n + n*2^n)/4.
%F For n > 1: a(n) = 2*a(n-1) + 3*2^(n-2). - _Philippe Deléham_, Nov 10 2011
%F a(n) = 4*a(n-1) - 4*a(n-2). - _Vincenzo Librandi_, Jun 24 2012
%t CoefficientList[Series[(x^2-x+1)/(1-2x)^2,{x,0,40}],x] (* _Vincenzo Librandi_, Jun 24 2012 *)
%o (PARI) a(n)=3*(0^n/3+2^n+n<<n)/4 \\ _Charles R Greathouse IV_, Nov 11 2011
%o (Magma) I:=[1, 3, 9]; [n le 3 select I[n] else 4*Self(n-1)-4*Self(n-2): n in [1..50]]; // _Vincenzo Librandi_, Jun 24 2012
%K easy,nonn
%O 0,2
%A _Paul Barry_, Jun 11 2003
|