Combinatorics

Catalan
Catalan (n)

Get n'th catalan number.

See Planetmath for more information.

Combinations
Combinations (k,n)

Get all combinations of k numbers from 1 to n as a vector of vectors

DoubleFactorial
DoubleFactorial (n)

Double factorial: n(n-2)(n-4)...

See Planetmath for more information.

Factorial
Factorial (n)

Factorial: n(n-1)(n-2)...

See Planetmath for more information.

FallingFactorial
FallingFactorial (n,k)

Falling factorial: (n)_k = n(n-1)...(n-(k-1))

See Planetmath for more information.

Fibbonachi
Fibbonachi (x)

Aliases: fib

Calculate nth fibbonachi number. That is the number defined recursively by Fibbonachi(n) = Fibbonachi(n-1) + Fibbonachi(n-2) and Fibbonachi(1) = Fibbonachi(2) = 1.

See Planetmath or Mathworld for more information.

GaloisMatrix
GaloisMatrix (combining_rule)

Galois matrix given a linear combining rule (a_1*x_+...+a_n*x_n=x_(n+1))

HarmonicNumber
HarmonicNumber (n,r)

Aliases: HarmonicH

Harmonic Number, the n'th harmonic number of order r.

Hofstadter
Hofstadter (n)

Hofstadter's function q(n) defined by q(1)=1, q(2)=1, q(n)=q(n-q(n-1))+q(n-q(n-2))

LinearRecursiveSequence
LinearRecursiveSequence (seed_values,combining_rule,n)

Compute linear recursive sequence using galois stepping

Multinomial
Multinomial (v,arg...)

Calculate multinomial coefficients

Pascal
Pascal (i)

Get the pascal's triangle as a matrix

Permutations
Permutations (k,n)

Get all permutations of k numbers from 1 to n as a vector of vectors

RisingFactorial
RisingFactorial (n,k)

Aliases: Puchhammer

(Puchhammer) Rising factorial: (n)_k = n(n+1)...(n+(k-1))

See Planetmath for more information.

Subfactorial
Subfactorial (n)

Subfactorial: n! times sum_{k=1}^n (-1)^k/k!

Triangular
Triangular (nth)

Calculate the n'th triangular number.

See Planetmath for more information.

nCr
nCr (n,r)

Aliases: Binomial

Calculate combinations (binomial coefficient)

nPr
nPr (n,r)

Calculate permutations