login
A052672
Expansion of e.g.f. (1-x)/(1-x-2*x^2+x^3).
1
1, 0, 4, 6, 120, 600, 10080, 95760, 1693440, 23950080, 475372800, 8821612800, 199743667200, 4533271142400, 116906088499200, 3112264995840000, 90679371374592000, 2757644630028288000, 89895729202126848000
OFFSET
0,3
LINKS
FORMULA
E.g.f.: (1 - x)/(1 - x - 2*x^2 + x^3).
Recurrence: a(0)=1, a(1)=0, a(2)=4, a(n) = n*a(n-1) + 2*n*(n-1)*a(n-2) - n*(n-1)*(n-2)*a(n-3).
a(n) = (n!/7)*Sum_{alpha=RootOf(Z^3 -2*Z^2 -Z +1)} (3 - alpha)*alpha^(-n).
a(n) = n!*A052547(n). - R. J. Mathar, Nov 27 2011
MAPLE
spec := [S, {S=Sequence(Prod(Z, Union(Z, Prod(Z, Sequence(Z)))))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
With[{nn=20}, CoefficientList[Series[-(-1+x)/(x^3-2x^2-x+1), {x, 0, nn}], x] Range[0, nn]!] (* Harvey P. Dale, Sep 25 2021 *)
PROG
(Magma) I:=[1, 0, 4]; [n le 3 select I[n] else (n-1)*(Self(n-1) +2*(n-2)*Self(n-2) -(n-2)*(n-3)*Self(n-3)): n in [1..31]]; // G. C. Greubel, Jun 13 2022
(SageMath)
def A052672_list(prec):
P.<x> = PowerSeriesRing(QQ, prec)
return P( (1-x)/(1-x-2*x^2+x^3) ).egf_to_ogf().list()
A052672_list(30) # G. C. Greubel, Jun 13 2022
CROSSREFS
Sequence in context: A012934 A013165 A337466 * A375697 A377719 A377688
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved