cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A052931 Expansion of 1/(1 - 3*x^2 - x^3).

Original entry on oeis.org

1, 0, 3, 1, 9, 6, 28, 27, 90, 109, 297, 417, 1000, 1548, 3417, 5644, 11799, 20349, 41041, 72846, 143472, 259579, 503262, 922209, 1769365, 3269889, 6230304, 11579032, 21960801, 40967400, 77461435, 144863001, 273351705, 512050438, 964918116, 1809503019
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

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
From Wolfdieter Lang, Oct 02 2013: (Start)
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).
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)

Examples

			From _Wolfdieter Lang_, Oct 02 2013: (Start)
In the 9-gon (enneagon), powers of rho(9) = 2*cos(pi/9):
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:
  rho(9)^5 = 3 + 9*rho(9) + rho(9)^2. (End)
		

Crossrefs

Cf. A214699.

Programs

  • 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
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/(1-3*x^2-x^3) )); // G. C. Greubel, Oct 17 2019
    
  • Maple
    spec := [S,{S=Sequence(Prod(Z,Union(Z,Z,Z,Prod(Z,Z))))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    seq(coeff(series(1/(1-3*x^2-x^3), x, n+1), x, n), n = 0..40); # G. C. Greubel, Oct 17 2019
  • Mathematica
    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 *)
  • PARI
    x='x+O('x^40); Vec(1/(1-3*x^2-x^3)) \\ Altug Alkan, Feb 20 2018
    
  • Sage
    def A052931_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(1/(1-3*x^2-x^3)).list()
    A052931_list(40) # G. C. Greubel, Oct 17 2019
    

Formula

G.f.: 1/(1-3*x^2-x^3).
a(n) = 3*a(n-2) + a(n-3), with a(0)=1, a(1)=0, a(2)=3.
a(n) = Sum_{alpha=RootOf(-1+3*z^2+z^3)} (1/9)*(-1 +5*alpha +2*alpha^2) * alpha^(-1-n).
a(n) = Sum_{k=0..floor(n/2)} binomial(k, n-2k)3^(3k-n). - Paul Barry, Oct 04 2004
a(n) = A187497(3*(n+1)). - L. Edson Jeffery, Mar 19 2011.
3*a(n) = abs(A214699(n+1)). - Roman Witula, Oct 06 2012

Extensions

More terms from James Sellers, Jun 06 2000