The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A052960 Expansion of ( 1-x-x^2 ) / ( 1-2*x-2*x^2+x^3+x^4 ). 4

%I #24 Sep 08 2022 08:45:00

%S 1,1,3,7,18,46,118,303,778,1998,5131,13177,33840,86905,223182,573157,

%T 1471933,3780093,9707713,24930522,64024444,164422126,422254905,

%U 1084399096,2784861432,7151844025,18366756913,47167941348,121132691065

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

%C Diagonal sums of the Riordan matrix ((1-x-x^2)/(1-2*x-x^2), (x-x^2-x^3) / (1-2*x-x^2)) (A190215). - _Emanuele Munarini_, May 10 2011

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

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

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

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

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

%F a(n) = Sum_{alpha=RootOf(1-2*z-2*z^2+z^3+z^4)} (1/331)*(25 + 75*alpha - 6*alpha^2 - 5*alpha^3)*alpha^(-1-n).

%F a(n) = Sum_{i=0..n} Sum_{k=0..n/2} binomial(i+2*k, 2*k)*binomial(i+k, n-i-2*k). - _Emanuele Munarini_, May 10 2011

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

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

%t Table[Sum[Sum[Binomial[i+2k,2k]Binomial[i+k,n-i-2k],{k,0,n/2}],{i,0,n}],{n,0,12}] (* _Emanuele Munarini_, May 10 2011 *)

%t LinearRecurrence[{2,2,-1,-1}, {1,1,3,7}, 30] (* _G. C. Greubel_, Oct 23 2019 *)

%t CoefficientList[Series[(1-x-x^2)/(1-2x-2x^2+x^3+x^4),{x,0,50}],x] (* _Harvey P. Dale_, Jan 21 2021 *)

%o (Maxima) makelist(sum(sum(binomial(i+2*k, 2*k)*binomial(i+k, n-i-2*k), k,0,n/2),i,0,n),n,0,24); # _Emanuele Munarini_, May 10 2011

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

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

%o (Sage)

%o def A052960_list(prec):

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

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

%o A052960_list(30) # _G. C. Greubel_, Oct 23 2019

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

%K easy,nonn

%O 0,3

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

%E More terms from _James A. Sellers_, Feb 06 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 17 19:53 EDT 2024. Contains 372607 sequences. (Running on oeis4.)