Some notes for future me.
stirling2 <- function(n, k) {
partitions(n, k, layout = "l") %>%
map_dbl(~ npermutations(freq = .) / prod(factorial(table(.[. > 0])))) %>%
sum
}
bell <- function(n) {
partitions(n, layout = "l") %>%
map_dbl(~ npermutations(freq = .) / prod(factorial(table(.[. > 0])))) %>%
sum
}
ordered_bell <- function(n) {
compositions(n, layout = "l") %>%
map_dbl(~ npermutations(freq = .)) %>%
sum
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.