BigCombinatorics.BellMethod
Bell(n)

gives the n-th Bell number, that is, the number of partitions of an n-element set. See https://oeis.org/A000110

BigCombinatorics.BinomialMethod
Binomial(n,k)

returns the binomial coefficient n-choose-k. This is the number of k-element subsets of an n-element set. See https://oeis.org/A007318

BigCombinatorics.DerangementsMethod
Derangements(n)

returns the number of permutations of an n-set that have no fixed point. See https://oeis.org/A000166

BigCombinatorics.EulerMethod
Euler(n)

returns the n-th Euler number. Starting with n=0 this is the sequence 1, 0, -1, 0, 5, 0, -61, 0, 1385 and so on. See https://oeis.org/A122045

Not to be confused with Eulerian.

BigCombinatorics.EulerianMethod
Eulerian(n,k)

returns the number of permutations of {1,2,...,n} with k ascents. See https://oeis.org/A008292

Not to be confused with Euler.

BigCombinatorics.FactorialMethod

Factorial(n) returns n! for nonnegative integers n. See https://oeis.org/A000142

Factorial(n,k) returns n!/k! (to be consistent with Julia's factorial.) Requires 0 <= k <= n.

See also FallingFactorial and RisingFactorial.

BigCombinatorics.FallingFactorialMethod
FallingFactorial(n,k)

returns n*(n-1)*(n-2)*...*(n-k+1) (with a total of k factors). Requires n,k >= 0. If k>n then 0 is returned.

BigCombinatorics.FibonacciMethod

Fibonacci(n) returns the n-th Fibonacci number. We begin with Fibonacci(0)==0 and Fibonacci(1)==1. See https://oeis.org/A000045

BigCombinatorics.HyperFactorialMethod
HyperFactorial(n)

returns the hyperfactorial of n, that is 1^1 * 2^2 * 3^3 * ... * n^n. See https://oeis.org/A002109

BigCombinatorics.IntPartitionsMethod

IntPartitions(n) is the number of partitions of the integer n. See https://oeis.org/A000041

IntPartitions(n,k) is the number of partitions of the integer n with exactly k (nonzero) parts.

BigCombinatorics.IntPartitionsDistinctMethod

IntPartitionsDistinct(n,k) is the number of partitions of the integer n into exactly k distinct parts.

IntPartitionsDistinct(n) is the number of partitions of n into distinct parts.

BigCombinatorics.MenageMethod
Menage(n)

Number of solutions to the Menage problem with n male/female couples. See https://oeis.org/A059375

BigCombinatorics.MultiChooseMethod
MultiChoose(n,k)

returns the number of k-element multisets that can be formed using the elements of an n-element set.

Warning: This is not the same as Multinomial.

BigCombinatorics.MultinomialMethod
Multinomial(vec)

returns the multinomial coefficient whose top index is the sum of vec (an array of Ints) and whose bottom indices are given by vec.

This may also be called with a common-separated list of arguments, that is, either of Multinomial([1,2,3]) or Multinomial(1,2,3). The result is 60 in both cases as these equal 6!/(1! 2! 3!).

Warning: This is not the same as MultiChoose.

BigCombinatorics.PowerSumMethod
PowerSum(n,k)

returns the sum of the k-th powers of the integers 1 through n, i.e., 1^k + 2^k + 3^k + ... + n^k.

BigCombinatorics.Stirling1Method
Stirling1(n,k)

gives the (signed) Stirling number of the first kind, that is, the coefficient of x^k in the poynomial x(x-1)(x-2)...(x-n+1). See https://oeis.org/A008275

BigCombinatorics.Stirling2Method
Stirling2(n,k)

gives the Stirling number of the second kind, that is, the number of paritions of an n-set into k-parts." See https://oeis.org/A008277

BigCombinatorics._getMethod
_get(f::Function, x)

Retrieve the function value f(x) from the _master_table.

BigCombinatorics._hasMethod
_has(f::Function, x)

Check if argument x for function f is already in the _master_table.

BigCombinatorics._makeMethod
_make(f::Function, T::Type)

Create an entry in the _master_table for the function f.

BigCombinatorics._max_argMethod
_max_arg(f::Function)

Find the largest argument known for f. Note that f must be a function of just a single value.

BigCombinatorics._saveMethod
_save(f::Function, x, val::BigInt)

Save the computed value of f with argument(s) x and value val.

BigCombinatorics.cache_reportMethod

BigCombinatorics.cache_report() reports how many entries are saved for each function in the BigCombinatorics module.