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!)
A052958 Expansion of g.f.: (1-x)/(1-3*x-2*x^3+2*x^4). 1

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

%S 1,2,6,20,62,194,610,1914,6006,18850,59158,185658,582662,1828602,

%T 5738806,18010426,56523158,177389882,556712886,1747164122,5483225814,

%U 17208323450,54005872822,169489741850,531919420822,1669353361210

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

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

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

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

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

%F a(n) = Sum_{alpha=RootOf(1-3*z-2*z^3+2*z^4)} (1/3259)*(491 + 503*alpha + 272*alpha^2 - 498*alpha^3)*alpha^(-1-n).

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

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

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

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

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

%o (Sage)

%o def A052958_list(prec):

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

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

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

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

%K easy,nonn

%O 0,2

%A encyclopedia(AT)pommard.inria.fr, Jan 25 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 May 3 15:29 EDT 2024. Contains 372216 sequences. (Running on oeis4.)