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.

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

Original entry on oeis.org

1, 0, 3, 3, 12, 21, 57, 120, 291, 651, 1524, 3477, 8049, 18480, 42627, 98067, 225948, 520149, 1197993, 2758440, 6352419, 14627739, 33684996, 77568213, 178623201, 411327840, 947197443, 2181180963, 5022773292, 11566316181, 26634636057
Offset: 0

Views

Author

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

Keywords

Comments

Form the graph with matrix A=[0,1,1,1;1,1,0,0;1,0,1,0;1,0,0,1]. A052533 counts closed walks of length n at the vertex without loop. - Paul Barry, Oct 02 2004
Let M = [0, sqrt(3); sqrt(3), 1] be a 2 X 2 matrix. Then A052533 = {[M^n](1,1)}. Note also that {[M^n](2,2)} = A006130. - L. Edson Jeffery, Nov 25 2011
Pisano period lengths: 1, 3, 1, 6, 24, 3, 24, 6, 1, 24,120, 6,156, 24, 24, 12, 16, 3, 90, 24, ... - R. J. Mathar, Aug 10 2012
a(n) appears in the formula for powers of the fundamental algebraic number c = (1 + sqrt(13))/2 = A209927 of the quadratic number field Q(sqrt(13)): c^n = a(n) + A006130(n-1), for n >=0, with A006130(-1) = 0. The formulas given below and in A006130 in terms of S-Chebyshev polynomials are valid also for c^(-n), for n >= 0, with 1/c = (-1 + sqrt(13))/2 = A356033. - Wolfdieter Lang, Nov 26 2023

Crossrefs

Programs

  • GAP
    a:=[1,0];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, May 09 2019
  • Magma
    I:=[1,0]; [n le 2 select I[n] else Self(n-1)+3*Self(n-2): n in [1..40]]; // G. C. Greubel, May 09 2019
    
  • Magma
    R:=PowerSeriesRing(Integers(), 33); Coefficients(R!( (1-x)/(1-x-3*x^2))); // Marius A. Burtea, Jan 15 2020
    
  • Maple
    spec := [S,{S=Sequence(Prod(Z,Union(Z,Z,Z),Sequence(Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    seq(coeff(series((1-x)/(1-x-3*x^2), x, n+1), x, n), n = 0..40); # G. C. Greubel, Jan 15 2020
  • Mathematica
    CoefficientList[Series[(1-x)/(1-x-3x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 07 2013 *)
    LinearRecurrence[{1,3}, {1,0}, 40] (* G. C. Greubel, May 09 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-x-3*x^2)) \\ G. C. Greubel, May 09 2019
    
  • Sage
    [lucas_number1(n+1,1,-3) -lucas_number1(n,1,-3) for n in (0..40)] # G. C. Greubel, May 09 2019
    

Formula

G.f.: (1 - x)/(1 - x - 3*x^2).
a(n) = A006130(n) - A006130(n-1).
a(n) = a(n-1) + 3*a(n-2), with a(0)=1, a(1)=0.
a(n) = Sum_{alpha = RootOf(-1+x+3*x^2)} (1/13)*(-1 + 7*alpha)* alpha^(-n-1).
a(n) = Sum_{k=0..floor(n/2)} C(n-k-1,n-2*k)*3^k. - Paul Barry, Mar 16 2010
If p[1]=0, and p[i]=3, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det A. - Milan Janjic, Apr 29 2010
G.f.: (Q(0) -1)*(1-x)/x, where Q(k) = 1 + 3*x^2 + (k+2)*x - x*(k+1 + 3*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
a(n) = 3^(n/2) * Fibonacci(n-1, 1/sqrt(3)). - G. C. Greubel, Jan 15 2020
From Wolfdieter Lang, Nov 27 2023: (Start)
a(n) = 3*A006130(n-2), with A006130(-2) = 1/3 and A006130(-1) = 0.
a(n) = 3*sqrt(-3)^(n-2)*S(n-2, 1/sqrt(-3)), with the S Chebyshev polynomials (see A049310), valid also for negative indices n, using S(-n, x) = - S(n-2, x), for n>= 2, and S(-1, x) = 0. (End)

Extensions

More terms from James Sellers, Jun 06 2000