CatalanNumber
The nth Catalan number , counting balanced bracket sequences, binary trees, polygon triangulations, and many other structures of size n.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Catalan numberMathWorldCatalanNumberWikidataQ270513nLabCatalan numberDLMF26.5.E1OEISA000108Wolfram LanguageCatalanNumber!CatalanNumber(n)the nth Catalan number .Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer) -> integer | compute-engine | always |
(number) -> number | analyticreplaces compute-engine | always |
(any) -> any | number-theoryreplaces analytic | always |
Details
- The Catalan numbers have the closed form .
- They satisfy the recurrence with .
- is the number of monotonic lattice paths from one corner of an grid to the opposite corner that stay below the diagonal.
- compute-engine extends to real and complex arguments through the Binomial gamma-function form . At a negative integer it instead follows Wolfram's own with for a negative integer , giving and for every integer (the smooth Gamma-ratio limit disagrees at , giving -- see the divergence note on that example).
Examples
2 more kept as data, checked against the oraclesProperties #
Negative index gives zero, not a pole
live ↗InOut
Known value · Wolfram MathematicalFunctionData, CatalanNumber
Vanishes for a negative integer index
live ↗InOut
Known value · Wolfram MathematicalFunctionData, CatalanNumber
Catalan numbers are zero below index 0
live ↗InOut
Known value · Wolfram MathematicalFunctionData, CatalanNumber
Another negative index, another zero
live ↗InOut
Known value · Wolfram MathematicalFunctionData, CatalanNumber
Zero at every negative integer, not just
live ↗InOut
Known value · Wolfram MathematicalFunctionData, CatalanNumber
live ↗
InOut
About
| Examples | 33 |
|---|---|
| Checked against | Wolfram Language 31 agree1 differ1 unevaluatedSageMath 22 agree2 differ4 errorSymPy 27 agree3 differmpmath 27 agree1 errormathlib4 10 agreeJulia 13 agree1 differ14 errorOscar 3 agreeRust 3 agree1 differ |
| Crosswalk | WikipediaMathWorldWikidatanLabDLMFOEISWolfram LanguageSageMathSymPyJulia |
Implementation
mapped
wolframpackages/oracle/src/mappings.tsmapped
sympypackages/oracle/src/mappings.tsmapped
sagepackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.tsmapped
mathlib4packages/oracle/src/mappings.tsmapped
mpmathpackages/oracle/src/mappings.tsbinomial(2n, n)/(n + 1), continued by the gamma function.
See also: Binomial, BellNumber