combinatorics_operation
Compute binomial coefficients, permutations, combinations, integer partitions, factorial, Catalan, Fibonacci, and Bell numbers. Returns a single integer per operation.
Instructions
Combinatorics: binomial coefficients, permutations, combinations, integer partitions, factorial, Catalan, Fibonacci and Bell numbers. Prefer this over evaluate_sage for any of these.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Secondary argument (for binomial, combinations). Decimal strings accepted, as for n. | |
| n | Yes | Primary integer argument. Values at or above 2^53 must be passed as a decimal string, e.g. "9007199254740993", because a JSON number that large has already been rounded by the client. | |
| session | No | Named workspace to use. Workspaces have independent variables; omit for 'default'. | default |
| operation | Yes | One of: binomial (n choose k), permutations (n!), combinations (n choose k), partitions (COUNT of integer partitions of n), factorial (n!), catalan (nth Catalan number), fibonacci (nth Fibonacci number), bell (nth Bell number). All return a single integer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||