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 A052946 #26 Jul 02 2025 16:01:58 %S A052946 1,1,4,10,29,80,224,624,1741,4855,13541,37765,105326,293751,819264, %T A052946 2284905,6372539,17772840,49567974,138243749,385558106,1075311210, %U A052946 2999014106,8364169855,23327445251,65059618751,181449530649 %N A052946 Expansion of (1-x)^2/(1-3*x+2*x^3-x^4). %H A052946 G. C. Greubel, <a href="/A052946/b052946.txt">Table of n, a(n) for n = 0..1000</a> %H A052946 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=1005">Encyclopedia of Combinatorial Structures 1005</a> %H A052946 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-2,1). %F A052946 G.f.: (1 - x)^2/(1 - 3*x + 2*x^3 - x^4). %F A052946 a(n) = 3*a(n-1) - 2*a(n-3) + a(n-4). %F A052946 a(n) = Sum_{alpha=RootOf(-1+3*z-2*z^3+z^4)} (1/643)*(79 + 128*alpha - 133*alpha^2 + 40*alpha^3)*alpha^(-1-n). %p A052946 spec := [S,{S=Sequence(Prod(Union(Prod(Sequence(Z),Sequence(Z)),Z),Z))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20); %p A052946 seq(coeff(series((1-x)^2/(1-3*x+2*x^3-x^4), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Oct 21 2019 %t A052946 LinearRecurrence[{3,0,-2,1}, {1,1,4,10}, 30] (* _G. C. Greubel_, Oct 21 2019 *) %t A052946 CoefficientList[Series[(1-x)^2/(1-3x+2x^3-x^4),{x,0,30}],x] (* _Harvey P. Dale_, Aug 30 2020 *) %o A052946 (PARI) my(x='x+O('x^30)); Vec((1-x)^2/(1-3*x+2*x^3-x^4)) \\ _G. C. Greubel_, Oct 21 2019 %o A052946 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)^2/(1-3*x+2*x^3-x^4) )); // _G. C. Greubel_, Oct 21 2019 %o A052946 (Sage) %o A052946 def A052946_list(prec): %o A052946 P.<x> = PowerSeriesRing(ZZ, prec) %o A052946 return P((1-x)^2/(1-3*x+2*x^3-x^4)).list() %o A052946 A052946_list(30) # _G. C. Greubel_, Oct 21 2019 %o A052946 (GAP) a:=[1,1,4,10];; for n in [5..30] do a[n]:=3*a[n-1]-2*a[n-3]+a[n-4]; od; a; # _G. C. Greubel_, Oct 21 2019 %K A052946 easy,nonn %O A052946 0,3 %A A052946 encyclopedia(AT)pommard.inria.fr, Jan 25 2000 %E A052946 More terms from _James Sellers_, Jun 06 2000