OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
B. Chern, P. Diaconis, D. M. Kane, R. C. Rhoades, Closed expressions for averages of set partition statistics, 2013.
MATHEMATICA
Table[BellB[n+3] - 6 BellB[n+2] + 8 BellB[n+1] BellB[n+1] - BellB[n], {n, 0, 20}] (* Vincenzo Librandi, Jul 16 2013 *)
#[[4]]-6#[[3]]+8#[[2]]^2-#[[1]]&/@Partition[BellB[Range[0, 20]], 4, 1] (* Harvey P. Dale, Nov 01 2016 *)
PROG
(PARI) B(n) = if (n<=1, return (1), return (sum(i=0, n-1, binomial(n-1, i)*B(n-1-i))))
a(n) = B(n+3) - 6*B(n+2) + 8*B(n+1)*B(n+1) - B(n)
(Magma) [Bell(n+3)-6*Bell(n+2)+8*Bell(n+1)*Bell(n+1)-Bell(n): n in [0..20]]; // Vincenzo Librandi, Jul 16 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Jun 19 2013
STATUS
approved