A001006: Motzkin numbers

Description Usage Arguments Value Examples

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

1
Motzkin(n, gmp = TRUE)

Arguments

n

the number of first n entries from the sequence.

gmp

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

Value

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

Examples

1
2
## generate first 30 Motzkin numbers
print(Motzkin(30))

Zseq documentation built on May 2, 2019, 2:38 a.m.