A001006: Motzkin numbers

MotzkinR 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 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

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


kisungyou/Zseq documentation built on Sept. 13, 2022, 5:12 a.m.