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

%I #63 Sep 19 2023 11:13:21

%S 1,0,2,1,5,5,14,19,42,66,131,221,417,728,1341,2380,4334,7753,14041,

%T 25213,45542,81927,147798,266110,479779,864201,1557649,2806272,

%U 5057369,9112264,16420730,29587889,53317085,96072133,173118414,311945595,562110290,1012883066

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

%C Form the graph with matrix A=[0,1,1;1,0,0;1,0,1] (P_3 with a loop at an extremity). Then A052547 counts closed walks of length n at the degree 2 vertex. - _Paul Barry_, Oct 02 2004

%C The characteristic polynomial x^3 - x^2 - 2*x + 1 generates a 3 step recursion: a(0)=1,a(1)=0,a(2)=2, for n>2 a(n)=a(n-1)+2*a(n-2)-a(n-3) so we can also prepend the term 1,0 to a(n) and get the same sequence, i.e. start with a(0)=1,a(1)=0,a(2)=1. - Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 30 2005

%C The length of the diagonals (including the side) of a regular 7-gon (heptagon) inscribed in a circle of radius r=1 are d_1=2*sin(Pi/7) (the side length), d_2=2*cos(Pi/7)*d_1, and d_3=2*sin(3*Pi/7). The two ratios are rho := R_2 = d_2/d_1 = 2*cos(Pi/7) approximately 1.801937736, and sigma:= R_3 = d_3/d_1 = S(2,rho) = rho^2-1, approximately 2.246979604. See A049310 for Chebyshev S-polynomials. See the Steinbach reference where the basis <1,rho,sigma> has been considered for an extension of the rational field Q, which is there called Q(rho). This rho is the largest zero of S(6,x). For nonnegative powers of rho one has rho^n = C(n)*1 + B(n)*rho + A(n)*sigma, with B(n)=a(n-1), a(-1):=0, a(-2):=1, A(n)=B(n+1)-B(n-1)= A006053(n), and C(n)=B(n-1)=a(n-2), n>=0. For negative powers see A106803 and -A006054. For nonnegative and negative powers of sigma see A006054, A106803 and a(n), -A006053, respectively.

%C a(n) appears also in the formula for the nonpositive powers of sigma (see the comment above for the definition and the Steinbach basis) as sigma^(-n) = a(n)*1 - A006053(n+1)*rho - a(n-1)*sigma, n>=0. Put a(-1):=0. 1/sigma=sigma-rho, the smallest positive zero of S(6,x) (see A049310 for Chebyshev S-polynomials). - _Wolfdieter Lang_, Dec 01 2010

%H G. C. Greubel, <a href="/A052547/b052547.txt">Table of n, a(n) for n = 0..1000</a>

%H Paul Barry, <a href="https://arxiv.org/abs/2104.01644">Centered polygon numbers, heptagons and nonagons, and the Robbins numbers</a>, arXiv:2104.01644 [math.CO], 2021.

%H Tomislav Došlić, Mate Puljiz, Stjepan Šebek, and Josip Žubrinić, <a href="https://arxiv.org/abs/2210.12411">On a variant of Flory model</a>, arXiv:2210.12411 [math.CO], 2022.

%H Man Gao, Colin Tan, and Jie Wu, <a href="https://doi.org/10.1016/j.topol.2016.06.015">Loop homological invariants associated to real projective spaces</a>, Topology Appl. 209, 275-288 (2016).

%H M. Gao and J. Wu, <a href="http://arxiv.org/abs/1301.0864">Homology Decompositions of the Loops on 1-Stunted Borel Constructions of C_2-Actions</a>, arXiv:1301.0864 [math.AT], 2013.

%H Jia Huang, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL26/Huang/huang8.html">Partially Palindromic Compositions</a>, J. Int. Seq. (2023) Vol. 26, Art. 23.4.1. See pp. 4, 15.

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

%H P. Steinbach, <a href="http://www.jstor.org/stable/2691048">Golden fields: a case for the heptagon</a>, Math. Mag. 70 (1997), no. 1, 22-31.

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

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

%F a(n) = Sum(-1/7*_alpha*(-3+_alpha)*_alpha^(-1-n), _alpha=RootOf(_Z^3-2*_Z^2-_Z+1)).

%F a(n) = 5*a(n-2) - 6*a(n-4) + a(n-6). - _Floor van Lamoen_, Nov 02 2005

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

%t LinearRecurrence[{1, 2, -1}, {1, 0, 2}, 40] (* _Vladimir Joseph Stephan Orlovsky_, Feb 13 2012 *)

%o (PARI) {a(n) = if(n==0,1,if(n==1,0,if(n==2,2,a(n-1)+2*a(n-2)-a(n-3))))};

%o for(i=0,40,print1(a(i),",")) \\ Lambert Klasen, Jan 30 2005

%o (Magma) I:=[1,0,2]; [n le 3 select I[n] else Self(n-1) + 2*Self(n-2) - Self(n-3): n in [1..40]]; // _G. C. Greubel_, May 08 2019

%o (Sage) ((1-x)/(1-x-2*x^2+x^3)).series(x, 40).coefficients(x, sparse=False) # _G. C. Greubel_, May 08 2019

%o (GAP) a:=[1,0,2];; for n in [4..40] do a[n]:=a[n-1]+2*a[n-2]-a[n-3]; od; a; # _G. C. Greubel_, May 08 2019

%Y Cf. A096976; second differences of A028495 and first differences of A006053 (up to an offset).

%K easy,nonn

%O 0,3

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

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