2 lines
152 B
Text
2 lines
152 B
Text
BellTriangle[n_Integer?Positive] := NestList[Accumulate[# /. {a___, b_} :> {b, a, b}] &, {1}, n - 1];
|
|
BellNumber[n_Integer] := BellTriangle[n][[n, 1]];
|