%I #23 Mar 02 2023 21:24:53
%S 0,3,6,36,120,528,2016,8256,32640,131328,523776,2098176,8386560,
%T 33558528,134209536,536887296,2147450880,8590000128,34359607296,
%U 137439215616,549755289600,2199024304128,8796090925056
%N a(n) = 2^(n-1)*(2^n - (-1)^n).
%D M. Gardner, Riddles of the Sphinx, New Mathematical Library, M.A.A., 1987, p. 145. Math. Rev. 89i:00015.
%H G. C. Greubel, <a href="/A003674/b003674.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 (2,8).
%F G.f.: 3*x/((1+2*x)*(1-4*x)).
%F a(n) = 3*A003683(n).
%F Given the 2 X 2 matrix M = [1,3; 3,1], a(n) = term (1,2) in M^n, n>0. - _Gary W. Adamson_, Aug 06 2010
%F From _G. C. Greubel_, Feb 17 2023: (Start)
%F a(n) = 2*a(n-1) + 8*a(n-2).
%F a(n) = 3*2^(n-1)*A001045(n).
%F a(n) = 2^(n-1)*A062510(n).
%F a(n) = (1/2)*A071930(n+1).
%F E.g.f.: (1/2)*(exp(4*x) - exp(-2*x)). (End)
%t Table[(4^n-(-2)^n)/2, {n,0,40}] (* _G. C. Greubel_, Feb 17 2023 *)
%o (PARI) a(n)=if(n<0,0,2^(n-1)*(2^n-(-1)^n))
%o (Magma) [(4^n -(-2)^n)/2: n in [0..40]]; // _G. C. Greubel_, Feb 17 2023
%o (SageMath) [(4^n-(-2)^n)/2 for n in range(41)] # _G. C. Greubel_, Feb 17 2023
%Y Cf. A001045, A003683 (one-third), A062510, A071930.
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_