File contents 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.
1 --- 2 name: prime-numbers 3 description: Prime Numbers 4 --- 5 6 # Prime Numbers 7 8 ## When to Use 9 10 Use this skill when working on prime-numbers problems in graph number theory. 11 12 ## Decision Tree 13 14 15 1. **Primality testing hierarchy** 16 - Trial division: O(sqrt(n)), exact 17 - Miller-Rabin: O(k log^3 n), probabilistic 18 - AKS: O(log^6 n), deterministic polynomial 19 20 2. **Factorization** 21 - Trial division for small factors 22 - Pollard's rho: probabilistic, medium numbers 23 - Quadratic sieve: large numbers 24 - `sympy_compute.py factor "n"` 25 26 3. **Prime distribution** 27 - Prime Number Theorem: pi(x) ~ x/ln(x) 28 - Prime gaps: p_{n+1} - p_n 29 - `sympy_compute.py limit "pi(x) * ln(x) / x"` 30 31 4. **Fermat's Little Theorem** 32 - a^{p-1} = 1 (mod p) for a not divisible by p 33 - Use for modular exponentiation 34 - `z3_solve.py prove "fermat_little"` 35 36 5. **Wilson's Theorem** 37 - (p-1)! = -1 (mod p) iff p is prime 38 39 40 ## Tool Commands 41 42 ### Sympy_Factor 43 ```bash 44 uv run python -m runtime.harness scripts/sympy_compute.py factor "n" 45 ``` 46 47 ### Z3_Primality 48 ```bash 49 uv run python -m runtime.harness scripts/z3_solve.py prove "no_divisor_between_1_and_sqrt_n" 50 ``` 51 52 ### Sympy_Prime_Count 53 ```bash 54 uv run python -m runtime.harness scripts/sympy_compute.py simplify "pi(x) ~ x/ln(x)" 55 ``` 56 57 ### Z3_Fermat_Little 58 ```bash 59 uv run python -m runtime.harness scripts/z3_solve.py prove "a**(p-1) == 1 mod p" 60 ``` 61 62 ## Key Techniques 63 64 *From indexed textbooks:* 65 66 67 ## Cognitive Tools Reference 68 69 See `.claude/skills/math-mode/SKILL.md` for full tool documentation.
DojoGenesis/plugins/tree/main/plugins/community-skills/skills/prime-numbers commit 559ee154d8
Frequently asked questions How do I install the Prime Numbers skill? Run npx skillmds@latest add dojogenesis/prime-numbers in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Prime Numbers skill do? Prime Numbers It is listed under Coding & Dev Tools on SkillMD.
Is Prime Numbers safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Prime Numbers? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Prime Numbers free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Prime Numbers? DojoGenesis (@dojogenesis) published this skill. Their other Agent Skills are listed on their SkillMD profile.