%I #34 Dec 31 2023 10:19:21
%S 0,3,6,18,48,132,360,984,2688,7344,20064,54816,149760,409152,1117824,
%T 3053952,8343552,22795008,62277120,170144256,464842752,1269974016,
%U 3469633536,9479215104,25897697280,70753824768,193303044096,528113737728,1442833563648,3941894602752,10769456332800
%N a(n) = 2*a(n-1) + 2*a(n-2); a(0)=0, a(1)=3.
%H Reinhard Zumkeller, <a href="/A083337/b083337.txt">Table of n, a(n) for n = 0..1000</a>
%H Martin Burtscher, Igor Szczyrba, RafaĆ Szczyrba, <a href="https://www.emis.de/journals/JIS/VOL18/Szczyrba/sz3.html">Analytic Representations of the n-anacci Constants and Generalizations Thereof</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,2).
%F G.f.: 3x/(1 - 2x - 2x^2).
%F a(n) = a(n-1) + 3*A026150(n-1). a(n)/A026150(n) converges to sqrt(3).
%F a(n) = lower left term of [1,1; 3,1]^n. - _Gary W. Adamson_, Mar 12 2008
%t CoefficientList[Series[3x/(1-2x-2x^2), {x, 0, 25}], x]
%t s = Sqrt[3]; a[n_] := Simplify[s*((1 + s)^n - (1 - s)^n)/2]; Array[a, 30, 0] (* or *)
%t LinearRecurrence[{2, 2}, {0, 3}, 31] (* _Robert G. Wilson v_, Aug 07 2018 *)
%o (Haskell)
%o a083337 n = a083337_list !! n
%o a083337_list =
%o 0 : 3 : map (* 2) (zipWith (+) a083337_list (tail a083337_list))
%o -- _Reinhard Zumkeller_, Oct 15 2011
%o (PARI) apply( a(n)=([1,1;3,1]^n)[2,1], [0..30]) \\ or: ([2,2;1,0]^n)[2,1]*3. - _M. F. Hasler_, Aug 06 2018
%Y Equals 3 * A002605.
%Y Cf. A026150.
%Y Cf. A028859, A028860, A030195, A080040, A106435, A108898, A125145.
%K easy,nonn
%O 0,2
%A Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003
%E Edited and definition completed by _M. F. Hasler_, Aug 06 2018