A178759 Expansion of e.g.f. 3*x*exp(x)*(exp(x)-1)^2.
0, 0, 0, 18, 144, 750, 3240, 12642, 46368, 163350, 559800, 1881066, 6229872, 20406750, 66273480, 213759090, 685601856, 2188698150, 6959413080, 22053083514, 69672773520, 219535296750, 690106487400, 2164714299138, 6777100916064, 21179698653750, 66083277045240, 205880260458762
Offset: 0
Examples
a(3)=18 because there are six length 3 sequences on {0,1,2} that contain at least one 0, at least one 1 and at least one 2: (0,1,2),(0,2,1),(1,0,2),(1,2,0),(2,0,1),(2,1,0). The digits sum to 18.
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (12,-58,144,-193,132,-36).
Programs
-
GAP
List([0..30], n -> (3^n - 3*2^n + 3)*n); # G. C. Greubel, Jan 24 2019
-
Magma
[(3^n - 3*2^n + 3)*n: n in [0..30]]; // G. C. Greubel, Jan 24 2019
-
Mathematica
Range[0,20]! CoefficientList[Series[3x Exp[x](Exp[x]-1)^2,{x,0,20}],x] Table[(3^n -3*2^n +3)*n, {n,0,30}] (* G. C. Greubel, Jan 24 2019 *)
-
PARI
my(x='x+O('x^30)); concat([0,0,0],Vec(serlaplace(3*x*exp(x)*(exp(x)-1)^2))) \\ Joerg Arndt, May 13 2013
-
PARI
concat([0,0,0], Vec(6*x^3*(11*x^2-12*x+3)/((x-1)^2*(2*x-1)^2*(3*x-1)^2) + O(x^100))) \\ Colin Barker, Nov 30 2014
-
PARI
vector(30, n, n--; (3^n - 3*2^n + 3)*n) \\ G. C. Greubel, Jan 24 2019
-
Sage
[(3^n - 3*2^n + 3)*n for n in (0..30)] # G. C. Greubel, Jan 24 2019
Formula
E.g.f.: 3*x*exp(x)*(exp(x)-1)^2.
a(n) = (3^n - 3*2^n + 3)*n. - Mark van Hoeij, May 13 2013
G.f.: 6*x^3*(11*x^2-12*x+3) / ((x-1)^2*(2*x-1)^2*(3*x-1)^2). - Colin Barker, Nov 30 2014
Comments