%I #38 Oct 10 2022 04:32:58
%S 1,3,21,135,873,5643,36477,235791,1524177,9852435,63687141,411680151,
%T 2661142329,17201894427,111194793549,718774444575,4646231048097,
%U 30033709622307,194140950878133,1254946834135719,8112103857448713
%N a(n) = ((3 + 2*sqrt(3))^n + (3 - 2*sqrt(3))^n)/2.
%H Harvey P. Dale, <a href="/A141041/b141041.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 (6,3).
%F a(n) = 3*abs(A099842(n-1)), for n > 0.
%F G.f.: (1-3*x)/(1-6*x-3*x^2). - _Philippe Deléham_, Mar 03 2012
%F a(n) = 6*a(n-1) + 3*a(n-2), a(0) = 1, a(1) = 3. - _Philippe Deléham_, Mar 03 2012
%F a(n) = Sum_{k=0..n} A201701(n,k)*3^(n-k). - _Philippe Deléham_, Mar 03 2012
%F G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(4*k-3)/(x*(4*k+1) - 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 27 2013
%F a(n) = (-i*sqrt(3))^n * ChebyshevT(n, i*sqrt(3)). - _G. C. Greubel_, Oct 10 2022
%t a[n_]= ((3+2*Sqrt[3])^n + (3-2*Sqrt[3])^n)/2; Table[FullSimplify[a[n]], {n,0,30}]
%t LinearRecurrence[{6,3},{1,3},30] (* _Harvey P. Dale_, Aug 25 2014 *)
%o (Magma) [n le 2 select 3^(n-1) else 6*Self(n-1) +3*Self(n-2): n in [1..31]]; // _G. C. Greubel_, Oct 10 2022
%o (SageMath)
%o A141041 = BinaryRecurrenceSequence(6,3,1,3)
%o [A141041(n) for n in range(31)] # _G. C. Greubel_, Oct 10 2022
%Y Cf. A011943, A034478, A081336, A099842, A201701.
%K nonn
%O 0,2
%A _Roger L. Bagula_, Aug 18 2008
%E Edited by _N. J. A. Sloane_, Aug 24 2008