

A178759


Expansion of 3*x*exp(x)*(exp(x)1)^2


0



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


COMMENTS

a(n) is the sum of the digits in ternary sequences of length n, in which each element of the alphabet, {0,1,2} appears at least once in the sequence.
Generally, the E.g.f. for such sum of nary sequences (taken on an alphabet of {0,1,2,...,n1}) is Binomial(n,2)*x*exp(x)*(exp(x)1)^(n1).
Cf. A058877 which is the sum of the digits in such binary sequences.


LINKS

Table of n, a(n) for n=0..27.


FORMULA

E.g.f.:3*x*exp(x)*(exp(x)1)^2
a(n) = (3^n3*2^n+3)*n  Mark van Hoeij, May 13 2013


EXAMPLE

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.


MATHEMATICA

Range[0, 20]! CoefficientList[Series[3x Exp[x](Exp[x]1)^2, {x, 0, 20}], x]


PROG

(PARI) x='x+O('x^66); concat([0, 0, 0], Vec(serlaplace(3*x*exp(x)*(exp(x)1)^2))) \\ Joerg Arndt, May 13 2013


CROSSREFS

Cf. A178756.
Sequence in context: A127408 A008452 A126900 * A036397 A247741 A224329
Adjacent sequences: A178756 A178757 A178758 * A178760 A178761 A178762


KEYWORD

nonn


AUTHOR

Geoffrey Critzer, Dec 26 2010


STATUS

approved



