%I #22 Sep 08 2022 08:44:59
%S 1,0,1,4,2,9,20,23,64,120,193,436,797,1452,2978,5513,10456,20547,
%T 38608,73984,142865,271032,520025,997700,1902226,3646905,6982156,
%U 13342639,25558832,48907224,93547505,179103308,342695989,655720140,1255083538
%N Expansion of (1-x)/(1 - x - x^2 - 3*x^3 + 3*x^4).
%H G. C. Greubel, <a href="/A052915/b052915.txt">Table of n, a(n) for n = 0..1000</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=897">Encyclopedia of Combinatorial Structures 897</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,3,-3).
%F G.f.: (1-x)/(1 - x - x^2 - 3*x^3 + 3*x^4).
%F a(n) = a(n-1) + a(n-2) + 3*a(n-3) - 3*a(n-4), with a(0)=1, a(1)=0, a(2)=1, a(3)=4.
%F a(n) = Sum_{alpha=RootOf(1 - z - z^2 - 3*z^3 + 3*z^4)} (1/2857)*(142 + 885*alpha - 240*alpha^2 - 351*alpha^3)*alpha^(-1-n).
%p spec := [S,{S=Sequence(Prod(Z,Z,Union(Sequence(Z),Z,Z,Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
%p seq(coeff(series((1-x)/(1-x-x^2-3*x^3+3*x^4), x, n+1), x, n), n = 0..40); # _G. C. Greubel_, Oct 16 2019
%t LinearRecurrence[{1,1,3,-3}, {1,0,1,4}, 40] (* _G. C. Greubel_, Oct 16 2019 *)
%o (PARI) my(x='x+O('x^40)); Vec((1-x)/(1-x-x^2-3*x^3+3*x^4)) \\ _G. C. Greubel_, Oct 16 2019
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)/(1-x-x^2-3*x^3+3*x^4) )); // _G. C. Greubel_, Oct 16 2019
%o (Sage)
%o def A052915_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P((1-x)/(1-x-x^2-3*x^3+3*x^4)).list()
%o A052915_list(40) # _G. C. Greubel_, Oct 16 2019
%o (GAP) a:=[1,0,1,4];; for n in [5..40] do a[n]:=a[n-1]+a[n-2]+3*a[n-3] -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 06 2000
|