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 A052550 #26 Jul 02 2025 16:01:58 %S A052550 1,1,4,11,35,108,337,1049,3268,10179,31707,98764,307641,958273, %T A052550 2984932,9297787,28961747,90213164,281005665,875306665,2726499332, %U A052550 8492793331,26454265995,82402592652,256676457289,799523432529,2490441569572 %N A052550 Expansion of (1-2*x)/(1 - 3*x - x^2 + 2*x^3). %H A052550 G. C. Greubel, <a href="/A052550/b052550.txt">Table of n, a(n) for n = 0..1000</a> %H A052550 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=487">Encyclopedia of Combinatorial Structures 487</a> %H A052550 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,1,-2). %F A052550 G.f.: (1 - 2*x)/(1 - 3*x - x^2 + 2*x^3). %F A052550 a(n) = 3*a(n-1) + a(n-2) - 2*a(n-3), with a(0)=1, a(1)=1, a(2)=4. %F A052550 a(n) = Sum((-1/229) * (-5 - 74*alpha + 16*alpha^2) * alpha^(-1-n), alpha = RootOf(1 - 3*z - z^2 + 2*z^3)). %p A052550 spec := [S,{S=Sequence(Prod(Z,Union(Z,Sequence(Union(Z,Z)))))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20); %t A052550 LinearRecurrence[{3,1,-2}, {1,1,4}, 30] (* _G. C. Greubel_, May 07 2019 *) %o A052550 (PARI) my(x='x+O('x^30)); Vec((1-2*x)/(1-3*x-x^2+2*x^3)) \\ _G. C. Greubel_, May 07 2019 %o A052550 (Magma) I:=[1,1,4]; [n le 3 select I[n] else 3*Self(n-1) +Self(n-2) -2*Self(n-3): n in [1..30]]; // _G. C. Greubel_, May 07 2019 %o A052550 (Sage) ((1-2*x)/(1-3*x-x^2+2*x^3)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, May 07 2019 %o A052550 (GAP) a:=[1,1,4];; for n in [4..30] do a[n]:=3*a[n-1]+a[n-2]-2*a[n-3]; od; a; # _G. C. Greubel_, May 07 2019 %K A052550 easy,nonn %O A052550 0,3 %A A052550 encyclopedia(AT)pommard.inria.fr, Jan 25 2000 %E A052550 More terms from _James Sellers_, Jun 06 2000