login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Expansion of e.g.f. (1 + x + x^2)^x.
2

%I #20 Oct 20 2024 04:08:12

%S 1,0,2,3,-4,90,-126,-840,21104,-137592,-88920,15741000,-197234808,

%T 535289040,25582565904,-522317151720,3223601137920,75590725210560,

%U -2388641226278976,23718732310200960,361277667059425920,-17515819241263405440,246424647059545933440

%N Expansion of e.g.f. (1 + x + x^2)^x.

%H Robert Israel, <a href="/A191422/b191422.txt">Table of n, a(n) for n = 0..448</a>

%F E.g.f.: (1 + x + x^2)^x.

%F a(n) = n!*Sum_{m=1..n} Sum_{k=0..n-2*m} Stirling1(m+k, m)*binomial(m+k, n-2*m-k)/(m+k)! for n > 0, a(0)=1.

%p S:= series((1+x+x^2)^x,x,41):

%p seq(coeff(S,x,k)*k!,k=0..40); # _Robert Israel_, Apr 28 2021

%o (Maxima)

%o a(n):=if n=0 then 1 else (sum(sum((stirling1(m+k,m)*binomial(m+k,n-2*m-k))/(m+k)!,k,0,n-2*m),m,1,n))*n!;

%o (PARI) my(x='x+O('x^30)); Vec(serlaplace((1+x+x^2)^x)) \\ _Michel Marcus_, Apr 28 2021

%K sign

%O 0,3

%A _Vladimir Kruchinin_, Jun 02 2011