%I #48 Mar 01 2024 10:53:37
%S 3,9,18,45,108,270,675,1701,4293,10854,27459,69498,175932,445419,
%T 1127763,2855493,7230222,18307377,46355652,117376290,297206739,
%U 752553261,1905530913,4824972522,12217257783,30935180610,78330624264
%N a(n) = (1 - 2*cos(Pi/9))^n + (1 + 2*cos(Pi*2/9))^n + (1 + 2*cos(Pi*4/9))^n.
%C From _L. Edson Jeffery_, Apr 05 2011: (Start)
%C Let U be the matrix (see [Jeffery])
%C U = U_(9,2) =
%C (0 0 1 0)
%C (0 1 0 1)
%C (1 0 1 1)
%C (0 1 1 1).
%C Then a(n) = Trace(U^n).
%C (End)
%C We note that all numbers of the form a(n)*3^(-floor((n+4)/3)) are integers. - _Roman Witula_, Sep 29 2012
%H Harry J. Smith, <a href="/A062882/b062882.txt">Table of n, a(n) for n = 1..200</a>
%H L. Edson Jeffery, <a href="/A220555/a220555_2.pdf">Danzer matrices</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-3).
%F G.f.: x*(3 - 9*x^2)/(1 - 3*x + 3*x^3). The terms in parentheses in the definition are the roots of x^3-3*x^2+3. - _Ralf Stephan_, Apr 10 2004
%F a(n) = 3*(a(n-1) - a(n-3)) for n >= 4 - _Roman Witula_, Sep 29 2012
%e We have a(2)=3*a(1), a(4)/a(3) = a(6)/a(5) = a(7)/a(6) = 5/2, a(6)=6*a(4), a(7)=15*a(4), and (1 + c(1))^8 + (1 + c(2))^8 + (1 + c(4))^8 = 7*3^5. - _Roman Witula_, Sep 29 2012
%p Digits := 1000:q := seq(floor(evalf((1-2*cos(1/9*Pi))^n+(1+2*cos(2/9*Pi))^n+(1+2*cos(4/9*Pi))^n)),n=1..50);
%t LinearRecurrence[{3,0,-3},{3,9,18},25] (* _Georg Fischer_ Feb 02 2019 *)
%o (PARI) { default(realprecision, 200); for (n=1, 200, a=(1 - 2*cos(1/9*Pi))^n + (1 + 2*cos(2/9*Pi))^n + (1 + 2*cos(4/9*Pi))^n; write("b062882.txt", n, " ", round(a)) ) } \\ _Harry J. Smith_, Aug 12 2009
%o (PARI) Vec((3-9*x^2)/(1-3*x+3*x^3)+O(x^66)) /* _Joerg Arndt_, Apr 08 2011 */
%Y Cf. A033304, A062883.
%K nonn,easy
%O 1,1
%A _Vladeta Jovovic_, Jun 27 2001
%E More terms from _Sascha Kurz_, Mar 24 2002
%E Adapted formula, denominator of g.f. and modified g.f. (and offset) to accommodate added initial term a(0)=4. - _L. Edson Jeffery_, Apr 05 2011
%E a(0) = 4 removed, g.f. and programs adapted by _Georg Fischer_, Feb 02 2019