2015-08-16 14:31:40 -04:00

701 B

Function catalan

Finds the nth Catalan numbers. This is used in Combinatorics applications such as Dyck paths, non-isomorphic ordered trees with n vertices, etc. catalan only takes integer arguments.

Syntax

math.catalan(n)

Parameters

Parameter Type Description
n Number | BigNumber The nth Catalan number to find

Returns

Type Description
Number | BigNumber C(n)

Examples

math.catalan(7); //returns 429

See also

combinations