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.

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

This page as a plain text file.
%I A052939 #27 Jul 02 2025 16:01:58
%S A052939 1,3,9,28,87,271,844,2629,8189,25508,79455,247495,770924,2401357,
%T A052939 7480005,23299524,72575863,226067103,704178124,2193449749,6832393165,
%U A052939 21282272996,66292312655,206494424631,643211040556,2003542920989
%N A052939 Expansion of (1-x)*(1+x)/(1-3*x-x^2+2*x^3).
%H A052939 Harvey P. Dale, <a href="/A052939/b052939.txt">Table of n, a(n) for n = 0..1000</a>
%H A052939 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=930">Encyclopedia of Combinatorial Structures 930</a>
%H A052939 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,1,-2).
%F A052939 G.f.: (1-x^2)/(1-3*x-x^2+2*x^3).
%F A052939 a(n) = 3*a(n-1) + a(n-2) - 2*a(n-3).
%F A052939 a(n) = Sum_{alpha=RootOf(1-3*z-z^2+2*z^3)} (1/229)*(66 +15*alpha -28*alpha^2)*alpha^(-1-n).
%p A052939 spec := [S,{S=Sequence(Union(Z,Z,Prod(Z,Sequence(Prod(Z,Z)))))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
%p A052939 seq(coeff(series((1-x^2)/(1-3*x-x^2+2*x^3), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Oct 18 2019
%t A052939 LinearRecurrence[{3,1,-2},{1,3,9},30] (* _Harvey P. Dale_, Aug 25 2019 *)
%o A052939 (PARI) my(x='x+O('x^30)); Vec((1-x^2)/(1-3*x-x^2+2*x^3)) \\ _G. C. Greubel_, Oct 18 2019
%o A052939 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x^2)/(1-3*x-x^2+2*x^3) )); // _G. C. Greubel_, Oct 18 2019
%o A052939 (Sage)
%o A052939 def A052939_list(prec):
%o A052939     P.<x> = PowerSeriesRing(ZZ, prec)
%o A052939     return P((1-x^2)/(1-3*x-x^2+2*x^3)).list()
%o A052939 A052939_list(30) # _G. C. Greubel_, Oct 18 2019
%o A052939 (GAP) a:=[1,3,9];; 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 18 2019
%K A052939 easy,nonn
%O A052939 0,2
%A A052939 encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E A052939 More terms from _James Sellers_, Jun 06 2000