Learn R Programming

Zseq (version 0.2.0)

Bell: Bell numbers

Description

Under OEIS A000110, the nth Bell number is the number of ways to partition a set of n labeled elements, where the first 6 entries are 1, 1, 2, 5, 15, 52.

Usage

Bell(n, gmp = TRUE)

Value

a vector of length n containing first entries from the sequence.

Arguments

n

the number of first n entries from the sequence.

gmp

a logical; TRUE to use large number representation, FALSE otherwise.

Examples

Run this code
## generate first 30 Bell numbers and print
print(Bell(30))

Run the code above in your browser using DataLab