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”).
%I #33 Sep 08 2022 08:46:04
%S 1,0,3,10,65,476,4207,43086,502749,6584512,95663051,1526969522,
%T 26564598073,500293750308,10141049220135,220142141757718,
%U 5095512540223637,125275254488912264,3260259408767933059,89541327910560478074,2588146468333823725041
%N Alternating sums of the ordered Bell numbers (number of preferential arrangements) A000670.
%H Vincenzo Librandi, <a href="/A217388/b217388.txt">Table of n, a(n) for n = 0..200</a>
%F a(n) = sum((-1)^(n-k)*t(k), k=0..n), where t = A000670 (ordered Bell numbers).
%F E.g.f.: 1/(2-exp(x))-exp(-x)*log(1/(2-exp(x))). [Typo corrected by _Vaclav Kotesovec_, Oct 08 2013]
%F G.f.: 1/(1+x)/Q(0), where Q(k)= 1 - x*(k+1)/(1 - x*(2*k+2)/Q(k+1)); (continued fraction). - _Sergei N. Gladkovskii_, May 20 2013
%F a(n) ~ n! /(2*(log(2))^(n+1)). - _Vaclav Kotesovec_, Oct 08 2013
%p with(combinat):
%p seq(sum((-1)^(n-k)*sum(factorial(j)*stirling2(k,j), j=0..k), k=0..n), n=0..30); # _Muniru A Asiru_, Feb 07 2018
%t t[n_] := Sum[StirlingS2[n, k]k!, {k, 0, n}]; Table[Sum[(-1)^(n - k)t[k], {k, 0, n}], {n, 0, 100}]
%t (* second program: *)
%t Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)(i+r)^(n-r)/(i!*(k-i-r)!), {i, 0, k-r}], {k, r, n}]; Fubini[0, 1] = 1; a[n_] := Sum[(-1)^(n-k) Fubini[k, 1], {k, 0, n}]; Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Mar 31 2016 *)
%o (Maxima)
%o t(n):=sum(stirling2(n,k)*k!,k,0,n);
%o makelist(sum((-1)^(n-k)*t(k),k,0,n),n,0,40);
%o (Magma)
%o A000670:=func<n | &+[StirlingSecond(n,i)*Factorial(i): i in [0..n]]>;
%o [&+[(-1)^(n-k)*A000670(k): k in [0..n]]: n in [0..20]]; // _Bruno Berselli_, Oct 03 2012
%o (PARI) for(n=0,30, print1(sum(k=0,n, (-1)^(n-k)*sum(j=0,k, j!*stirling(k,j,2))), ", ")) \\ _G. C. Greubel_, Feb 07 2018
%o (GAP) List([0..30],n->Sum([0..n],k->(-1)^(n-k)*Sum([0..k], j-> Factorial(j)*Stirling2(k,j)))); # _Muniru A Asiru_, Feb 07 2018
%Y Cf. A000670, A006957, A005649, A217389, A217391, A217392.
%K nonn
%O 0,3
%A _Emanuele Munarini_, Oct 02 2012