mcpbeat

Prime Numbers

parcadei/prime-numbers

Problem-solving strategies for prime numbers in graph number theory

404 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
3880
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/parcadei/Continuous-Claude-v3 --skill prime-numbers

The instruction itself

10 sections, as written by the author

Prime Numbers

When to Use

Use this skill when working on prime-numbers problems in graph number theory.

Decision Tree

  • Primality testing hierarchy
  • Trial division: O(sqrt(n)), exact
  • Miller-Rabin: O(k log^3 n), probabilistic
  • AKS: O(log^6 n), deterministic polynomial
  • Factorization
  • Trial division for small factors
  • Pollard's rho: probabilistic, medium numbers
  • Quadratic sieve: large numbers
  • sympy_compute.py factor "n"
  • Prime distribution
  • Prime Number Theorem: pi(x) ~ x/ln(x)
  • Prime gaps: p_{n+1} - p_n
  • sympy_compute.py limit "pi(x) * ln(x) / x"
  • Fermat's Little Theorem
  • a^{p-1} = 1 (mod p) for a not divisible by p
  • Use for modular exponentiation
  • z3_solve.py prove "fermat_little"
  • Wilson's Theorem
  • (p-1)! = -1 (mod p) iff p is prime

Tool Commands

Sympy_Factor

uv run python -m runtime.harness scripts/sympy_compute.py factor "n"

Z3_Primality

uv run python -m runtime.harness scripts/z3_solve.py prove "no_divisor_between_1_and_sqrt_n"

Sympy_Prime_Count

uv run python -m runtime.harness scripts/sympy_compute.py simplify "pi(x) ~ x/ln(x)"

Z3_Fermat_Little

uv run python -m runtime.harness scripts/z3_solve.py prove "a**(p-1) == 1 mod p"

Key Techniques

*From indexed textbooks:*

Cognitive Tools Reference

See .claude/skills/math-mode/SKILL.md for full tool documentation.

How to use it

Copy the folder

Take parcadei/prime-numbers from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.