The file CombinatorialFunctions.mth defines various combinatorial functions.  The function definitions in the file are automatically loaded when any of its functions are first used.


CATALAN(n) simplifies to the nth Catalan number.  For example, to determine the first 10 Catalan numbers, simplify the expression

VECTOR(CATALAN(n), n, 1, 10)


If n and k are positive integers, STIRLING(n, k) simplifies to the number of ways n objects can be partitioned into k nonempty subsets (i.e. the Stirling number of the second kind S(n, k) ).  If n and k are positive integers, STIRLING(-k, -n) simplifies to the number of permutations of n objects containing exactly k cycles (i.e. the Stirling number of the first kind s(n, k) ).  For example, to generate a table of the first 10 Stirling numbers of the first and second kinds with k=5, simplify the expression

TABLE([STIRLING(-5,-n),STIRLING(n,5)], n, 1, 10)


If n and k are positive integers, STIRLING1(n, k) and STIRLING_CYCLE(n, k) simplify to the Stirling number of the first kind s(n, k).  For example, to determine the first 10 Stirling numbers of the first kind containing exactly 5 cycles, simplify the expression

VECTOR(STIRLING1(n,5), n, 1, 10)


If n and k are positive integers, STIRLING2(n, k) and STIRLING_SUBSET(n, k) simplify to the Stirling number of the second kind S(n, k).  For example, to determine the first 10 Stirling numbers of the second kind with 5 nonempty subsets, simplify the expression

VECTOR(STIRLING2(n,5), n, 1, 10)


BERNOULLI(n) simplifies to the nth Bernoulli number.  For example, to determine the first 10 Bernoulli numbers, simplify the expression

VECTOR(BERNOULLI(n), n, 1, 10)


BERNOULLI_POLY(n, x) simplifies to the nth Bernoulli polynomial evaluated at x.  For example, to make a table of the first 6 Bernoulli polynomials, simplify the expression

TABLE(BERNOULLI_POLY(n,x), n, 1, 6)


EULER(n) simplifies to the nth Euler number.  For example, to determine the first 10 Euler numbers, simplify the expression

VECTOR(EULER(n), n, 1, 10)


EULER_POLY(n, x) simplifies to the nth Euler polynomial evaluated at x.  For example, to make a table of the first 6 Euler polynomials, simplify the expression

TABLE(EULER_POLY(n,x), n, 1, 6)


PARTS(n) simplifies to the number of decompositions of n into integer summands without regard to order.  For example, to verify that the number of parts of 4 = 1+3 = 2+2 = 1+1+2 = 1+1+1 is 5, simplify the expression

PARTS(4)


PARTS_LIST(n) simplifies to an n+1-element vector of the number of decompositions of 0 through n into integer summands without regard to order.  For example, to determine the number of parts of 0 through 4, simplify the expression

PARTS_LIST(4)


DISTINCT_PARTS(n) simplifies to the number of decompositions of n into distinct integer summands without regard to order.  For example, to verify that the number of distinct parts of 4 = 1+3 is 2, simplify the expression,

DISTINCT_PARTS(4)


BELL(n) simplifies to the nth Bell or exponential number.  For example, to determine the first 11 Bell numbers, simplify the expression

VECTOR(BELL(n), n, 0, 10)


RECURRENCE(u, v , v0, m) simplifies to a vector of m elements of the recurrence u where v0 is a vector of the first elements and v is a variable.  For example, to determine the first 8 Fibonacci numbers, simplify the expression

RECURRENCE(v SUB 1 + v SUB 2, v, [1,1], 8)


TRIANGULAR(n) simplifies to the nth triangular number.  For example, to determine the first 10 triangular numbers, simplify the expression

VECTOR(TRIANGULAR(n), n, 1, 10)


TETRAHEDRAL(n) simplifies to the nth tetrahedral number.  For example, to determine the first 10 tetrahedral numbers, simplify the expression

VECTOR(TETRAHEDRAL(n), n, 1, 10)


PENTATOPE(n) simplifies to the nth pentatope number.  For example, to determine the first 10 pentatope numbers, simplify the expression

VECTOR(PENTATOPE(n), n, 1, 10)


POLYGONAL(n, p) simplifies to the nth p-sided polygonal number, p³2.  For example, to determine the first 10 4-sided polygonal numbers, simplify the expression

VECTOR(POLYGONAL(n, 4), n, 1, 10)


POLYGONAL_PYRAMID(n, p, d) simplifies to the nth p-sided d-dimensional polygonal pyramid number, p³2.  For example, to determine the first 10 4-sided 4th dimensional polygonal pyramid numbers, simplify the expression

VECTOR(POLYGONAL_PYRAMID(n, 4, 4), n, 1, 10)


HEX(n) simplifies to the nth hex (i.e. 6-sided centered) number.  For example, to determine the first 10 hex numbers, simplify the expression

VECTOR(HEX(n), n, 1, 10)


STAR(n) simplifies to the nth star (i.e. 12-sided centered) number.  For example, to determine the first 10 star numbers, simplify the expression

VECTOR(STAR(n), n, 1, 10)


CENTERED(n, p) simplifies to the nth p-sided centered number.  For example, to determine the first 10 8-sided centered numbers, simplify the expression

VECTOR(CENTERED(n,8), n, 1, 10)


OCTAHEDRAL(n) simplifies to the nth octahedral number.  For example, to determine the first 10 octahedral numbers, simplify the expression

VECTOR(OCTAHEDRAL(n), n, 1, 10)


CENTERED_PYRAMID(n, p, d) simplifies to the nth p-sided d-dimensional centered pyramid number, p³2.  For example, to determine the first 10 6-sided 3-dimensional numbers, simplify the expression

VECTOR(CENTERED_PYRAMID(n, 6, 3), n, 1, 10)


CENTERED_CUBE(n, d) simplifies to the nth d-dimensional centered cube number.  For example, to determine the first 10 3-dimensional centered cube numbers, simplify the expression

VECTOR(CENTERED_CUBE(n, 3), n, 1, 10)


RHOMBIC_DODECAHEDRAL(n) simplifies to the nth rhombic dodecahedral number.  For example, to determine the first 10 rhombic dodecahedral numbers, simplify the expression

VECTOR(RHOMBIC_DODECAHEDRAL(n), n, 1, 10)


CENTERED_HEX(n, d) simplifies to the nth d-dimensional centered hex number.  For example, to determine the first 10 4-dimensional centered hex numbers, simplify the expression

VECTOR(CENTERED_HEX(n, 4), n, 1, 10)


Other Utility File LibraryG5BS2R 

Created with the Personal Edition of HelpNDoc: Create help files for the Qt Help Framework