cp's OEIS Frontend

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.

A052545 Expansion of (1-x)^2/(1-3*x+x^3).

This page as a plain text file.
%I A052545 #43 Sep 08 2022 08:44:59
%S A052545 1,1,4,11,32,92,265,763,2197,6326,18215,52448,151018,434839,1252069,
%T A052545 3605189,10380728,29890115,86065156,247814740,713554105,2054597159,
%U A052545 5915976737,17034376106,49048531159,141229616740,406654474114
%N A052545 Expansion of (1-x)^2/(1-3*x+x^3).
%C A052545 (1, 4, 11, 32, ...) = INVERT transform of (1, 3, 4, 5, 6, 7, ...).
%H A052545 G. C. Greubel, <a href="/A052545/b052545.txt">Table of n, a(n) for n = 0..1000</a>
%H A052545 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=481">Encyclopedia of Combinatorial Structures 481</a>
%H A052545 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-1).
%F A052545 G.f.: (1-x)^2/(1-3*x+x^3).
%F A052545 a(n) = 3*a(n-1) - a(n-3), with a(0)=a(1)=1, a(2)=4.
%F A052545 a(n) = Sum_{alpha = RootOf(1-3*x+x^3)} (-1/9 * (-1+2*alpha^2-2*alpha) * alpha^(-1-n)).
%F A052545 a(n) = A076264(n) - 2*A076264(n-1) + A076264(n-2). - _R. J. Mathar_, Nov 28 2011
%p A052545 spec := [S,{S=Sequence(Prod(Z,Union(Z,Sequence(Z)),Sequence(Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
%t A052545 LinearRecurrence[{3,0,-1}, {1,1,4}, 40] (* _G. C. Greubel_, May 08 2019 *)
%o A052545 (Python)
%o A052545 TOP = 33
%o A052545 a = [1]*TOP
%o A052545 a[2]=4
%o A052545 for n in range(3,TOP):
%o A052545     print(a[n-3], end=',')
%o A052545     a[n] = 3*a[n-1] - a[n-3]
%o A052545 # _Alex Ratushnyak_, Aug 10 2012
%o A052545 (PARI) my(x='x+O('x^40)); Vec((1-x)^2/(1-3*x+x^3)) \\ _G. C. Greubel_, May 08 2019
%o A052545 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)^2/(1-3*x+x^3) )); // _G. C. Greubel_, May 08 2019
%o A052545 (Sage) ((1-x)^2/(1-3*x+x^3)).series(x, 40).coefficients(x, sparse=False) # _G. C. Greubel_, May 08 2019
%o A052545 (GAP) a:=[1,1,4];; for n in [4..40] do a[n]:=3*a[n-1]-a[n-3]; od; a; # _G. C. Greubel_, May 08 2019
%Y A052545 Cf. A215448. First differences of A052536.
%K A052545 easy,nonn
%O A052545 0,3
%A A052545 encyclopedia(AT)pommard.inria.fr, Jan 25 2000