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

%I #71 Jan 02 2024 14:49:39

%S 1,0,3,3,12,21,57,120,291,651,1524,3477,8049,18480,42627,98067,225948,

%T 520149,1197993,2758440,6352419,14627739,33684996,77568213,178623201,

%U 411327840,947197443,2181180963,5022773292,11566316181,26634636057

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

%C 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

%C 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

%C 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

%C 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

%H Vincenzo Librandi, <a href="/A052533/b052533.txt">Table of n, a(n) for n = 0..1000</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=463">Encyclopedia of Combinatorial Structures 463</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,3).

%F G.f.: (1 - x)/(1 - x - 3*x^2).

%F a(n) = A006130(n) - A006130(n-1).

%F a(n) = a(n-1) + 3*a(n-2), with a(0)=1, a(1)=0.

%F a(n) = Sum_{alpha = RootOf(-1+x+3*x^2)} (1/13)*(-1 + 7*alpha)* alpha^(-n-1).

%F a(n) = Sum_{k=0..floor(n/2)} C(n-k-1,n-2*k)*3^k. - _Paul Barry_, Mar 16 2010

%F 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

%F 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

%F a(n) = 3^(n/2) * Fibonacci(n-1, 1/sqrt(3)). - _G. C. Greubel_, Jan 15 2020

%F From _Wolfdieter Lang_, Nov 27 2023: (Start)

%F a(n) = 3*A006130(n-2), with A006130(-2) = 1/3 and A006130(-1) = 0.

%F 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)

%p spec := [S,{S=Sequence(Prod(Z,Union(Z,Z,Z),Sequence(Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);

%p seq(coeff(series((1-x)/(1-x-3*x^2), x, n+1), x, n), n = 0..40); # _G. C. Greubel_, Jan 15 2020

%t CoefficientList[Series[(1-x)/(1-x-3x^2), {x, 0, 40}], x] (* _Vincenzo Librandi_, Oct 07 2013 *)

%t LinearRecurrence[{1,3}, {1,0}, 40] (* _G. C. Greubel_, May 09 2019 *)

%o (PARI) my(x='x+O('x^30)); Vec((1-x)/(1-x-3*x^2)) \\ _G. C. Greubel_, May 09 2019

%o (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

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 33); Coefficients(R!( (1-x)/(1-x-3*x^2))); // _Marius A. Burtea_, Jan 15 2020

%o (Sage) [lucas_number1(n+1,1,-3) -lucas_number1(n,1,-3) for n in (0..40)] # _G. C. Greubel_, May 09 2019

%o (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

%Y Cf. A006130, A049310, A209927, A274977, A356033.

%K nonn,easy

%O 0,3

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

%E More terms from _James A. Sellers_, Jun 06 2000