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 A052925 #25 Jul 02 2025 16:01:58 %S A052925 2,2,4,9,22,56,145,378,988,2585,6766,17712,46369,121394,317812,832041, %T A052925 2178310,5702888,14930353,39088170,102334156,267914297,701408734, %U A052925 1836311904,4807526977,12586269026,32951280100,86267571273 %N A052925 Expansion of (2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2)). %H A052925 Vincenzo Librandi, <a href="/A052925/b052925.txt">Table of n, a(n) for n = 0..1000</a> %H A052925 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=910">Encyclopedia of Combinatorial Structures 910</a> %H A052925 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-4,1). %F A052925 G.f.: (2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2)). %F A052925 a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3), with a(0)=2, a(1)=2, a(2)=4, a(3)=9. %F A052925 a(n) = 1 + Sum_{alpha=RootOf(1-3*z+z^2)} (1/5)*(2-3*alpha)*alpha^(-1-n). %p A052925 spec:=[S,{S=Union(Sequence(Z),Sequence(Prod(Sequence(Z),Sequence(Z),Z) ))}, unlabeled]: seq(combstruct[count](spec,size=n), n=0..20); %p A052925 seq(coeff(series((2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2)), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Oct 17 2019 %t A052925 CoefficientList[Series[(-2+6*x-4*x^2+x^3)/(-1+x)/(1-3*x+x^2),{x,0,40}],x] (* _Vincenzo Librandi_, Jun 22 2012 *) %t A052925 LinearRecurrence[{4,-4,1}, {2,2,4,9}, 30] (* _G. C. Greubel_, Oct 17 2019 *) %o A052925 (Magma) I:=[2,2,4,9]; [n le 4 select I[n] else 4*Self(n-1)-4*Self(n-2) +Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Jun 22 2012 %o A052925 (PARI) my(x='x+O('x^30)); Vec((2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2))) \\ _G. C. Greubel_, Oct 17 2019 %o A052925 (Sage) %o A052925 def A052925_list(prec): %o A052925 P.<x> = PowerSeriesRing(ZZ, prec) %o A052925 return P((2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2))).list() %o A052925 A052925_list(30) # _G. C. Greubel_, Oct 17 2019 %o A052925 (GAP) a:=[2,4,9];; for n in [4..30] do a[n]:=4*a[n-1]-4*a[n-2]+a[n-3]; od; Concatenation([2], a); # _G. C. Greubel_, Oct 17 2019 %Y A052925 Apart from first term, same as A055588. %K A052925 easy,nonn %O A052925 0,1 %A A052925 encyclopedia(AT)pommard.inria.fr, Jan 25 2000 %E A052925 More terms from _James Sellers_, Jun 05 2000