%I #70 Sep 08 2022 08:44:59
%S 1,0,3,1,9,6,28,27,90,109,297,417,1000,1548,3417,5644,11799,20349,
%T 41041,72846,143472,259579,503262,922209,1769365,3269889,6230304,
%U 11579032,21960801,40967400,77461435,144863001,273351705,512050438,964918116,1809503019
%N Expansion of 1/(1 - 3*x^2 - x^3).
%C Let A be the tridiagonal unit-primitive matrix (see [Jeffery]) A = A_{9,1} = [0,1,0,0; 1,0,1,0; 0,1,0,1; 0,0,1,1]. Then a(n)=[A^n]_(2,3). - _L. Edson Jeffery_, Mar 19 2011
%C From _Wolfdieter Lang_, Oct 02 2013: (Start)
%C This sequence a(n) appears in the formula for the nonnegative powers of the algebraic number rho(9) := 2*cos(Pi/9) of degree 3, the ratio of the smallest diagonal/side in the regular 9-gon, in terms of the power basis of the algebraic number field Q(rho(9)) (see A187360, n=9).
%C rho(9)^n = A(n)*1 + B(n)*rho(9) + C(n)*rho(9)^2, with A(0) = 1, A(1) = 0, A(n) = B(n-2), n >= 2, B(0) = 0, B(n) = a(n-1), n >= 1, C(0) = 0, C(n) = B(n-1), n >= 1. (End)
%H Vincenzo Librandi, <a href="/A052931/b052931.txt">Table of n, a(n) for n = 0..1000</a>
%H N. Gogin and A. Mylläri, <a href="http://math.unm.edu/~aca/ACA/2013/Nonstandard/Gogin.pdf">Padovan-like sequences and Bell polynomials</a>, Proceedings of Applications of Computer Algebra ACA, 2013.
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=917">Encyclopedia of Combinatorial Structures 917</a>
%H L. E. Jeffery, <a href="https://oeis.org/wiki/User:L._Edson_Jeffery/Unit-Primitive_Matrices">Unit-primitive matrices</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,1).
%F G.f.: 1/(1-3*x^2-x^3).
%F a(n) = 3*a(n-2) + a(n-3), with a(0)=1, a(1)=0, a(2)=3.
%F a(n) = Sum_{alpha=RootOf(-1+3*z^2+z^3)} (1/9)*(-1 +5*alpha +2*alpha^2) * alpha^(-1-n).
%F a(n) = Sum_{k=0..floor(n/2)} binomial(k, n-2k)3^(3k-n). - _Paul Barry_, Oct 04 2004
%F a(n) = A187497(3*(n+1)). - _L. Edson Jeffery_, Mar 19 2011.
%F 3*a(n) = abs(A214699(n+1)). - _Roman Witula_, Oct 06 2012
%e From _Wolfdieter Lang_, Oct 02 2013: (Start)
%e In the 9-gon (enneagon), powers of rho(9) = 2*cos(pi/9):
%e rho(9)^5 = A(5)*1 + B(5)*rho(9) + C(5)*rho(9)^2, with A(5) = B(3) = a(2) = 3, B(5) = a(4) = 9 and C(5) = B(4) = a(3) = 1:
%e rho(9)^5 = 3 + 9*rho(9) + rho(9)^2. (End)
%p spec := [S,{S=Sequence(Prod(Z,Union(Z,Z,Z,Prod(Z,Z))))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
%p seq(coeff(series(1/(1-3*x^2-x^3), x, n+1), x, n), n = 0..40); # _G. C. Greubel_, Oct 17 2019
%t CoefficientList[Series[1/(1-3x^2-x^3),{x,0,40}],x] (* or *) LinearRecurrence[{0,3,1},{1,0,3},40] (* _Vladimir Joseph Stephan Orlovsky_, Jan 28 2012 *)
%o (PARI) x='x+O('x^40); Vec(1/(1-3*x^2-x^3)) \\ _Altug Alkan_, Feb 20 2018
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/(1-3*x^2-x^3) )); // _G. C. Greubel_, Oct 17 2019
%o (Sage)
%o def A052931_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P(1/(1-3*x^2-x^3)).list()
%o A052931_list(40) # _G. C. Greubel_, Oct 17 2019
%o (GAP) a:=[1,0,3];; for n in [4..40] do a[n]:=3*a[n-2]+a[n-3]; od; a; # _G. C. Greubel_, Oct 17 2019
%Y Cf. A214699.
%K easy,nonn
%O 0,3
%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E More terms from _James A. Sellers_, Jun 06 2000