VOOZH
about
URL: https://oeis.org/A052946
⇱ A052946 - OEIS
login
A052946
Expansion of (1-x)^2/(1-3*x+2*x^3-x^4).
2
1, 1, 4, 10, 29, 80, 224, 624, 1741, 4855, 13541, 37765, 105326, 293751, 819264, 2284905, 6372539, 17772840, 49567974, 138243749, 385558106, 1075311210, 2999014106, 8364169855, 23327445251, 65059618751, 181449530649
(
list
;
graph
;
refs
;
listen
;
history
;
text
;
internal format
)
OFFSET
0,3
LINKS
G. C. Greubel,
Table of n, a(n) for n = 0..1000
INRIA Algorithms Project,
Encyclopedia of Combinatorial Structures 1005
Index entries for linear recurrences with constant coefficients
, signature (3,0,-2,1).
FORMULA
G.f.: (1 - x)^2/(1 - 3*x + 2*x^3 - x^4).
a(n) = 3*a(n-1) - 2*a(n-3) + a(n-4).
a(n) = Sum_{alpha=RootOf(-1+3*z-2*z^3+z^4)} (1/643)*(79 + 128*alpha - 133*alpha^2 + 40*alpha^3)*alpha^(-1-n).
MAPLE
spec := [S, {S=Sequence(Prod(Union(Prod(Sequence(Z), Sequence(Z)), Z), Z))}, unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);
seq(coeff(series((1-x)^2/(1-3*x+2*x^3-x^4), x, n+1), x, n), n = 0..30); #
G. C. Greubel
, Oct 21 2019
MATHEMATICA
LinearRecurrence[{3, 0, -2, 1}, {1, 1, 4, 10}, 30] (*
G. C. Greubel
, Oct 21 2019 *)
CoefficientList[Series[(1-x)^2/(1-3x+2x^3-x^4), {x, 0, 30}], x] (*
Harvey P. Dale
, Aug 30 2020 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-x)^2/(1-3*x+2*x^3-x^4)) \\
G. C. Greubel
, Oct 21 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)^2/(1-3*x+2*x^3-x^4) )); //
G. C. Greubel
, Oct 21 2019
(SageMath)
def
A052946
_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1-x)^2/(1-3*x+2*x^3-x^4)).list()
A052946
_list(30) #
G. C. Greubel
, Oct 21 2019
(GAP) a:=[1, 1, 4, 10];; for n in [5..30] do a[n]:=3*a[n-1]-2*a[n-3]+a[n-4]; od; a; #
G. C. Greubel
, Oct 21 2019
CROSSREFS
Sequence in context:
A377824
A321344
A329156
*
A026152
A025179
A116388
Adjacent sequences:
A052943
A052944
A052945
*
A052947
A052948
A052949
KEYWORD
easy
,
nonn
AUTHOR
INRIA Encyclopedia of Combinatorial Structures
, Jan 25 2000
EXTENSIONS
More terms from
James Sellers
, Jun 06 2000
STATUS
approved