%I #13 Sep 08 2022 08:45:29
%S 3,27,189,1215,6318,37179,216513,1253151,7223661,41806692,241805655,
%T 1398221271,8084811933,46753521975,270362105694,1563413859999,
%U 9040715391141,52279683047127,302316992442837,1748203962973380,10109314209860523,58458991419115875
%N a(n) = 3^n*tetranacci(n) or (2^n)*A001648(n).
%H G. C. Greubel, <a href="/A127220/b127220.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,9,27,81).
%F a(n) = Trace of matrix [({{3,3,3,3},{3,0,0,0},{0,3,0,0),{0,0,3,0}})^n].
%F a(n) = 3^n * Trace of matrix [({{1,1,1,1},{1,0,0,0},{0,1,0,0},{0,0,1,0})^n].
%F From _Colin Barker_, Sep 02 2013: (Start)
%F a(n) = 3*a(n-1) + 9*a(n-2) + 27*a(n-3) + 81*a(n-4).
%F G.f.: -3*x*(108*x^3+27*x^2+6*x+1)/(81*x^4+27*x^3+9*x^2+3*x-1). (End)
%t Table[Tr[MatrixPower[3*{{1, 1, 1, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}}, x]], {x, 1, 20}]
%t LinearRecurrence[{3, 9, 27, 81}, {3, 27, 189, 1215}, 50] (* _G. C. Greubel_, Dec 19 2017 *)
%o (PARI) x='x+O('x^30); Vec(-3*x*(108*x^3 +27*x^2 +6*x +1)/(81*x^4 +27*x^3 +9*x^2 +3*x -1)) \\ _G. C. Greubel_, Dec 19 2017
%o (Magma) I:=[3, 27, 189, 1215]; [n le 4 select I[n] else 3*Self(n-1) + 9*Self(n-2) + 27*Self(n-3) + 81*Self(n-4): n in [1..30]]; // _G. C. Greubel_, Dec 19 2017
%Y Cf. A087131, A127210, A127211, A127212, A127213, A127214, A127216, A001648, A127221, A127222.
%K nonn,easy
%O 1,1
%A _Artur Jasinski_, Jan 09 2007
%E More terms from _Colin Barker_, Sep 02 2013
|