Motzkin {Zseq} | R Documentation |
Motzkin numbers
Description
Under OEIS A001006, a Motzkin number for a given n is the number of ways for drawing non-intersecting chords among n points on a circle, where the first 7 entries are 1, 1, 2, 4, 9, 21, 51.
Usage
Motzkin(n, gmp = TRUE)
Arguments
n |
the number of first |
gmp |
a logical; |
Value
a vector of length n
containing first entries from the sequence.
Examples
## generate first 30 Motzkin numbers
print(Motzkin(30))
[Package Zseq version 0.2.1 Index]