[Previous] [Next] [Contents]

[ImplState=stable,TestState=stable,DocState=stable]

combinat::bell -- Bell numbers

Introduction

combinat::bell(n) computes the n-th Bell number.

Call(s)


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.

Returns

A positive integer value if n was a nonnegative integer. Otherwise combinat::bell returns the unevaluated function call.

Details

Example 1

>> combinat::bell(3) 
                                     5

This means that you can partition the set 1,2,3 into disjoint subsets in 5 different ways. These are {{1,2,3}}, {{1},{2,3}}, {{2},{1,3}}, {{3},{1,2}}, and {{1},{2},{3}}. Or, that you can write 105 = 3*5*7 as 5 different products. These are 105 = 3*5*7 = 15*7 = 21*5 = 3*35 = 105*1.

Example 2

If one uses a wrong argument, an error message is returned.

>> combinat::bell(3.4) 
      Error: Nonnegative integer expected [combinat::bell]

Example 3

It can be useful to return the unevaluated function call.

>> a:=combinat::bell(x)
                             combinat::bell(x)
>> x :=4
                                     4
>> a ; delete a:
                                    15

[Previous] [Next] [Contents]


MuPAD Combinat, an open source algebraic combinatorics package