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 A052911 #28 Jul 02 2025 16:01:58 %S A052911 1,2,7,21,66,205,639,1990,6199,19309,60146,187349,583575,1817782, %T A052911 5662223,17637301,54938562,171128541,533049583,1660400166,5171992999, %U A052911 16110279997,50182032658,156312391973,486898648583,1516644272406 %N A052911 Expansion of (1-x)/(1 - 3*x - x^2 + 2*x^3). %H A052911 G. C. Greubel, <a href="/A052911/b052911.txt">Table of n, a(n) for n = 0..1000</a> %H A052911 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=891">Encyclopedia of Combinatorial Structures 891</a> %H A052911 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,1,-2). %F A052911 G.f.: (1-x)/(1 - 3*x - x^2 + 2*x^3) %F A052911 a(n) = 3*a(n-1) + a(n-2) - 2*a(n-3). %F A052911 a(n) = Sum_{alpha=RootOf(1 - 3*z - z^2 + 2*z^3)} (1/229)*(43 + 41*alpha - 46*alpha^2)*alpha^(-1-n). %F A052911 a(n) = center term in M^n * [1 1 1] where M = Hosoya's triangle considered as an upper triangular 3 X 3 matrix: [2 1 2 / 1 1 0 / 1 0 0]. E.g., a(4) = 66 since M^4 * [1 1 1] = [139 66 45]. The analogous procedure using M^n * [1 0 0] generates A100058. - _Gary W. Adamson_, Oct 31 2004 %F A052911 a(n) = A100058(n) - A100058(n-1). - _R. J. Mathar_, May 04 2018 %p A052911 spec := [S,{S=Sequence(Union(Z,Prod(Union(Sequence(Z),Z,Z),Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20); %t A052911 LinearRecurrence[{3,1,-2}, {1,2,7}, 30] (* _G. C. Greubel_, Oct 15 2019 *) %o A052911 (PARI) my(x='x+O('x^30)); Vec((1-x)/(1-3*x-x^2+2*x^3)) \\ _G. C. Greubel_, Oct 15 2019 %o A052911 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1-3*x-x^2+2*x^3) )); // _G. C. Greubel_, Oct 15 2019 %o A052911 (Sage) %o A052911 def A052911_list(prec): %o A052911 P.<x> = PowerSeriesRing(ZZ, prec) %o A052911 return P((1-x)/(1-3*x-x^2+2*x^3)).list() %o A052911 A052911_list(30) # _G. C. Greubel_, Oct 15 2019 %o A052911 (GAP) a:=[1,2,7];; for n in [4..30] do a[n]:=3*a[n-1]+a[n-2]-2*a[n-3]; od; a; # _G. C. Greubel_, Oct 15 2019 %Y A052911 Cf. A100058, A058071, A100059. %K A052911 easy,nonn %O A052911 0,2 %A A052911 encyclopedia(AT)pommard.inria.fr, Jan 25 2000 %E A052911 More terms from _James Sellers_, Jun 06 2000