combinat::bell(n) computes the n-th Bell number.
Calls:
combinat::bell(n)
combinat::bell(expression)
Parameters:
n:
nonnegative integer
expression:
An expression of type Type::Arithmetical which must be a nonnegative integer if it is a number.
Return Value:
A positive integer value if n was a nonnegative integer. Otherwise combinat::bell returns the unevaluated function call.
Details:
The n-th Bell number is defined by the exponential generating function:
[画像:math]
Often another definition is used. The n-th Bell number is the number of different ways of partitioning the set math into disjoint nonempty subsets, and math is defined to be 1.
Bell numbers are computed using the formula:
math
math for math
The third Bell number is math:
combinat::bell(3)
math
This means that you can partition the set math into disjoint subsets in math different ways. These are math, math, math, math, and math. Or, that you can write math as math different products. These are math.
If one uses a wrong argument, an error message is returned.
combinat::bell(3.4)
Error: Nonnegative integer expected [combinat::bell]
It can be useful to return the unevaluated function call.
a := combinat::bell(x);
x := 4;
a ;
delete(a);
math
math
math