Skip to content
Back to skills

Prime Numbers

ASecurity

Problem-solving strategies for prime numbers in graph number theory

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 12, 2026
ai-agentspythongobashtestinggitdocumentation

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add thedixitjain/the-mega-skill-library --skill prime-numbers --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prime Numbers?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prime Numbers
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thedixitjain-prime-numbers/badge)](https://www.skillsdirectory.com/skills/thedixitjain-prime-numbers)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prime-numbers
description: "Problem-solving strategies for prime numbers in graph number theory"
allowed-tools: "[Bash, Read]"
category: general-purpose
source_repo: parcadei/Continuous-Claude-v3
source_path: ".claude/skills/math/graph-number-theory/prime-numbers/SKILL.md"
source_url: https://github.com/parcadei/Continuous-Claude-v3/blob/HEAD/.claude/skills/math/graph-number-theory/prime-numbers/SKILL.md
---


# Prime Numbers

## When to Use

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

## Decision Tree


1. **Primality testing hierarchy**
   - Trial division: O(sqrt(n)), exact
   - Miller-Rabin: O(k log^3 n), probabilistic
   - AKS: O(log^6 n), deterministic polynomial

2. **Factorization**
   - Trial division for small factors
   - Pollard's rho: probabilistic, medium numbers
   - Quadratic sieve: large numbers
   - `sympy_compute.py factor "n"`

3. **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"`

4. **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"`

5. **Wilson's Theorem**
   - (p-1)! = -1 (mod p) iff p is prime


## Tool Commands

### Sympy_Factor
```bash
uv run python -m runtime.harness scripts/sympy_compute.py factor "n"
```

### Z3_Primality
```bash
uv run python -m runtime.harness scripts/z3_solve.py prove "no_divisor_between_1_and_sqrt_n"
```

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

### Z3_Fermat_Little
```bash
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.

---

**Source:** [`parcadei/Continuous-Claude-v3`](https://github.com/parcadei/Continuous-Claude-v3) → `.claude/skills/math/graph-number-theory/prime-numbers/SKILL.md`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.