Class CatalanSequence
java.lang.Object
org.episteme.core.mathematics.analysis.series.CatalanSequence
- All Implemented Interfaces:
Function<Natural,Integer>, Function<Natural, Integer>, Relation<Natural, Integer>, IntegerSequence, Sequence<Integer>
Catalan numbers: C(0)=1, C(n) = (2n)! / ((n+1)! * n!).
OEIS A000108: Catalan numbers.
Counts the number of:
- Binary trees with n internal nodes
- Ways to triangulate a convex (n+2)-gon
- Balanced parentheses sequences of length 2n
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the n-th term of the sequence (0-indexed).Returns the codomain description.Returns a formula or description of how terms are computed.getName()Returns a human-readable name for this sequence.Returns the OEIS (Online Encyclopedia of Integer Sequences) identifier.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Function
andThen, compose, contains, evaluate, getBackend, isContinuous, isDifferentiable, setBackendMethods inherited from interface IntegerSequence
getLong, getLong
-
Constructor Details
-
CatalanSequence
public CatalanSequence()
-
-
Method Details
-
get
-
getOEISId
-
getName
-
getFormula
Description copied from interface:SequenceReturns a formula or description of how terms are computed.- Specified by:
getFormulain interfaceSequence<Integer>- Returns:
- mathematical formula or description
-
getCodomain
-