login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052954 Expansion of (2-x-x^2-x^3)/((1-x)*(1-x^2-x^3)). 1

%I #27 Sep 08 2022 08:44:59

%S 2,1,2,2,2,3,3,4,5,6,8,10,13,17,22,29,38,50,66,87,115,152,201,266,352,

%T 466,617,817,1082,1433,1898,2514,3330,4411,5843,7740,10253,13582,

%U 17992,23834,31573,41825,55406,73397,97230,128802,170626,226031,299427

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

%C For n > 2, a(n) = floor(sqrt(a(n-3)*a(n-2) + a(n-2)*a(n-1) + a(n-1)*a(n-3))). - _Gerald McGarvey_, Sep 19 2004

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

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

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

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

%F a(n) = a(n-2) + a(n-3) - 1.

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

%F lim n->inf a(n)/a(n-1) = positive root of 1+x-x^3 (smallest Pisot-Vijayaraghavan number, A060006) - _Gerald McGarvey_, Sep 19 2004

%F a(n) = 2*A023434(n+1) - A023434(n) - A023434(n-2) - A023434(n-3). - _R. J. Mathar_, Nov 28 2011

%F a(n) = 1 + A000931(n+3). - _G. C. Greubel_, Oct 22 2019

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

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

%t LinearRecurrence[{1,1,0,-1}, {2,1,2,2}, 40] (* _G. C. Greubel_, Oct 22 2019 *)

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

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-x^2-x^3)/((1-x)*(1-x^2-x^3)) )); // _G. C. Greubel_, Oct 22 2019

%o (Sage)

%o def A052954_list(prec):

%o P.<x> = PowerSeriesRing(ZZ, prec)

%o return P((2-x-x^2-x^3)/((1-x)*(1-x^2-x^3))).list()

%o A052954_list(40) # _G. C. Greubel_, Oct 22 2019

%o (GAP) a:=[2,1,2,2];; for n in [5..40] do a[n]:=a[n-1]+a[n-2]-a[n-4]; od; a; # _G. C. Greubel_, Oct 22 2019

%Y Cf. A000931, A023434, A060006.

%K easy,nonn

%O 0,1

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

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)