This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A052949 #25 Jul 02 2025 16:01:58 %S A052949 2,2,4,7,15,32,71,158,354,794,1783,4005,8998,20217,45426,102070, %T A052949 229348,515339,1157955,2601900,5846415,13136774,29518062,66326482, %U A052949 149034251,334876921,752461610,1690765889,3799116466,8536537210,19181424996 %N A052949 Expansion of (2-4*x+x^3)/((1-x)*(1-2*x-x^2+x^3)). %H A052949 G. C. Greubel, <a href="/A052949/b052949.txt">Table of n, a(n) for n = 0..1000</a> %H A052949 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=1008">Encyclopedia of Combinatorial Structures 1008</a> %H A052949 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-2,1). %F A052949 G.f.: (2 -4*x +x^3)/((1-x)*(1 -2*x -x^2 +x^3)). %F A052949 a(n) = 2*a(n-1) + a(n-2) - a(n-3) - 1. %F A052949 a(n) = A006356(n-1) + 1, n>0. %F A052949 a(n) = 1 + Sum_{alpha=RootOf(1-2*z-z^2+z^3)} (1/7)*(1 + 2*alpha - alpha^2)*alpha^(-1-n). %p A052949 spec:= [S,{S=Union(Sequence(Prod(Union(Sequence(Z),Z),Z)),Sequence(Z))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20); %p A052949 seq(coeff(series((2-4*x+x^3)/((1-x)*(1-2*x-x^2+x^3)), x, n+1), x, n), n = 0..40); # _G. C. Greubel_, Oct 21 2019 %t A052949 LinearRecurrence[{3,-1,-2,1}, {2,2,4,7}, 40] (* _G. C. Greubel_, Oct 21 2019 *) %t A052949 CoefficientList[Series[(2-4x+x^3)/((1-x)(1-2x-x^2+x^3)),{x,0,50}],x] (* _Harvey P. Dale_, Jul 30 2024 *) %o A052949 (PARI) my(x='x+O('x^40)); Vec((2-4*x+x^3)/((1-x)*(1-2*x-x^2+x^3))) \\ _G. C. Greubel_, Oct 21 2019 %o A052949 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-4*x+x^3)/((1-x)*(1-2*x-x^2+x^3)) )); // _G. C. Greubel_, Oct 21 2019 %o A052949 (Sage) %o A052949 def A052949_list(prec): %o A052949 P.<x> = PowerSeriesRing(ZZ, prec) %o A052949 return P((2-4*x+x^3)/((1-x)*(1-2*x-x^2+x^3))).list() %o A052949 A052949_list(40) # _G. C. Greubel_, Oct 21 2019 %o A052949 (GAP) a:=[2,2,4,7];; for n in [5..40] do a[n]:=3*a[n-1]-a[n-2]-2*a[n-3] +a[n-4]; od; a; # _G. C. Greubel_, Oct 21 2019 %Y A052949 Cf. A006356. %K A052949 easy,nonn %O A052949 0,1 %A A052949 encyclopedia(AT)pommard.inria.fr, Jan 25 2000 %E A052949 More terms from _James Sellers_, Jun 05 2000