%I #17 Sep 08 2022 08:46:05
%S 0,0,0,0,1,11,89,660,4795,35067,261505,2001608,15777434,128270836,
%T 1076208942,9318227402,83230080505,766465520673,7272362469647,
%U 71040825568988,713933196773609
%N a(n) = (-5*B(n+2) + (2*n+9)*B(n+1) + (2*n+1)*B(n))/4, where the B(i) are Bell numbers (A000110).
%H Vincenzo Librandi, <a href="/A226854/b226854.txt">Table of n, a(n) for n = 0..200</a>
%H B. Chern, P. Diaconis, D. M. Kane, R. C. Rhoades, <a href="http://math.stanford.edu/~rhoades/FILES/setpartitions.pdf">Closed expressions for averages of set partition statistics</a>, 2013.
%t Table[(-5 BellB[n+2] + (2 n + 9) BellB[n + 1] + (2 n + 1) BellB[n])/4, {n, 0, 30}] (* _Vincenzo Librandi_ Jul 16 2013 *)
%o (PARI) B(n) = if (n<=1, return (1), return (sum(i=0, n-1, binomial(n-1, i)*B(n-1-i))))
%o a(n) = (-5*B(n+2) + (2*n+9)*B(n+1) + (2*n+1)*B(n))/4
%o (Magma) [(-5*Bell(n+2)+(2*n+9)*Bell(n+1)+(2*n+1)*Bell(n))/4: n in [0..30]]; // _Vincenzo Librandi_, Jul 16 2013
%K nonn
%O 0,6
%A _Michel Marcus_, Jun 19 2013
|