bell | R Documentation |
Generate Bell numbers.
bell(n)
n |
integer, asking for the n-th Bell number. |
Bell numbers, commonly denoted as B_n, are defined as the number of
partitions of a set of n
elements. They can easily be calculated
recursively.
Bell numbers also appear as moments of probability distributions, for example
B_n
is the n-th momentum of the Poisson distribution with mean 1.
A single integer, as long as n<=22
.
sapply(0:10, bell) # 1 1 2 5 15 52 203 877 4140 21147 115975
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.