login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

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

%S 1,0,0,2,1,1,5,5,6,15,20,27,51,76,110,185,286,430,690,1077,1651,2601,

%T 4065,6290,9841,15370,23885,37277,58176,90576,141245,220320,343296,

%U 535210,834605,1300877,2028001,3162001,4929150,7684275,11980276

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

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

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

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

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

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

%F a(n) = Sum_{alpha=RootOf(1-z-2*z^3+z^4)} (1/643)*(-13 + 201*alpha - 38*alpha^2 - 18*alpha^3)*alpha^(-1-n).

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

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

%t LinearRecurrence[{1,0,2,-1},{1,0,0,2},50] (* _Harvey P. Dale_, Apr 21 2011 *)

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

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

%o (Sage)

%o def A052916_list(prec):

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

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

%o A052916_list(50) # _G. C. Greubel_, Oct 16 2019

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

%K easy,nonn

%O 0,4

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

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