agentsclimarketplace

Combinatorics calculator

Skill a5c-ai/babysitter/library/specializations/algorithms-optimization/skills/combinatorics-calculator

Calculate combinatorial values with modular arithmeticFrom its SKILL.md

Install
npx -y skills add a5c-ai/babysitter --skill combinatorics-calculator

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.9 KB, 417 tokens by cl100k_base, as published. Nobody here has run it

Combinatorics Calculator Skill

Purpose

Calculate combinatorial values with modular arithmetic support for competitive programming applications.

Capabilities

  • Factorial and inverse factorial precomputation
  • nCr, nPr with modular arithmetic
  • Catalan, Stirling, Bell numbers
  • Lucas theorem implementation
  • Inclusion-exclusion principle application
  • Generating functions

Target Processes

  • combinatorics-counting
  • number-theory-algorithms
  • dp-pattern-matching

Combinatorial Functions

Basic Counting

  • Factorial: n!
  • Permutations: P(n,r) = n!/(n-r)!
  • Combinations: C(n,r) = n!/(r!(n-r)!)

Special Numbers

  • Catalan numbers
  • Stirling numbers (first and second kind)
  • Bell numbers
  • Derangements

Advanced Techniques

  • Lucas theorem (for large n, small p)
  • Inclusion-exclusion
  • Burnside's lemma
  • Generating functions

Input Schema

{
  "type": "object",
  "properties": {
    "operation": {
      "type": "string",
      "enum": ["nCr", "nPr", "factorial", "catalan", "stirling", "lucas", "precompute"]
    },
    "n": { "type": "integer" },
    "r": { "type": "integer" },
    "mod": { "type": "integer" },
    "precomputeLimit": { "type": "integer" }
  },
  "required": ["operation"]
}

Output Schema

{
  "type": "object",
  "properties": {
    "success": { "type": "boolean" },
    "result": { "type": "integer" },
    "code": { "type": "string" },
    "formula": { "type": "string" }
  },
  "required": ["success"]
}

What ships with it: 1 file

690 B alongside SKILL.md

Keep looking

Skills are one crate of 326,059. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.