[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M736J3QCQM7VMYQ0PJS5QD4Q":3,"skill-same:01M736J3QCQM7VMYQ0PJS5QD4Q":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M736J3QCQM7VMYQ0PJS5QD4Q","analyze-prime-numbers",null,"Analyze prime numbers using primality tests, factorization algorithms, prime distribution analysis, and sieve methods. Covers trial division, Miller-Rabin, Sieve of Eratosthenes, and the Prime Number Theorem. Use when determining whether an integer is prime or composite, finding prime factorizations, counting or listing primes up to a bound, or investigating prime properties within a number-theoretic proof or computation.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fanalyze-prime-numbers\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: analyze-prime-numbers\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\ndescription: >\n  Analyze prime numbers using primality tests, factorization algorithms,\n  prime distribution analysis, and sieve methods. Covers trial division,\n  Miller-Rabin, Sieve of Eratosthenes, and the Prime Number Theorem.\n  Use when determining whether an integer is prime or composite, finding\n  prime factorizations, counting or listing primes up to a bound, or\n  investigating prime properties within a number-theoretic proof or\n  computation.\nlicense: MIT\nallowed-tools: Read Bash\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: number-theory\n  complexity: intermediate\n  language: multi\n  tags: number-theory, primes, primality, factorization, sieve\n---\n\n# Analyze Prime Numbers\n\nAnalyze prime numbers by selecting and applying the appropriate algorithm for the task at hand: primality testing, integer factorization, or prime distribution analysis. Verify results computationally and relate findings to the Prime Number Theorem.\n\n## When to Use\n\n- Determining whether a given integer is prime or composite\n- Finding the complete prime factorization of an integer\n- Counting or listing primes up to a given bound\n- Verifying the Prime Number Theorem approximation for a specific range\n- Investigating properties of primes in a number-theoretic proof or computation\n\n## Inputs\n\n- **Required**: The integer(s) to analyze, or a bound for distribution analysis\n- **Required**: Task type -- one of: primality test, factorization, or distribution analysis\n- **Optional**: Preferred algorithm (trial division, Miller-Rabin, Sieve of Eratosthenes, Pollard's rho)\n- **Optional**: Whether to produce a formal proof of primality or a computational verdict\n- **Optional**: Output format (factor tree, prime list, count, table)\n\n## Procedure\n\n### Step 1: Determine the Task Type\n\nClassify the request into one of three categories and select the appropriate algorithmic path.\n\n1. **Primality test**: Given a single integer n, determine whether n is prime.\n2. **Factorization**: Given a composite integer n, find its complete prime factorization.\n3. **Distribution analysis**: Given a bound N, analyze the primes up to N (count, list, gaps, density).\n\nRecord the task type and the input value(s).\n\n**Got:** A clear classification with the input values recorded.\n\n**If fail:** If the input is ambiguous (e.g., \"analyze 60\"), ask the user to clarify whether they want a primality test, factorization, or distribution analysis. Default to factorization for composite numbers and primality confirmation for suspected primes.\n\n### Step 2: Apply Primality Testing (if task = primality)\n\nTest whether n is prime using an algorithm matched to the size of n.\n\n1. **Handle trivial cases**: n \u003C 2 is not prime. n = 2 or n = 3 is prime. If n is even and n > 2, it is composite.\n\n2. **Small n (n \u003C 10^6)**: Use trial division.\n   - Test divisibility by all primes p up to floor(sqrt(n)).\n   - Optimization: test 2, then odd numbers 3, 5, 7, ... or use a 6k +\u002F- 1 wheel.\n   - If no divisor found, n is prime.\n\n3. **Large n (n >= 10^6)**: Use Miller-Rabin probabilistic test.\n   - Write n - 1 = 2^s * d where d is odd.\n   - For each witness a in {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37}:\n     - Compute x = a^d mod n.\n     - If x = 1 or x = n - 1, this witness passes.\n     - Otherwise, square x up to s - 1 times. If x ever equals n - 1, pass.\n     - If no pass, n is composite (a is a witness).\n   - For n \u003C 3.317 * 10^24, the witnesses {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37} give a deterministic result.\n\n4. **Record the verdict**: prime or composite, with the witness or certificate.\n\n**Small primes reference (first 25):**\n\n| Index | Prime | Index | Prime | Index | Prime |\n|-------|-------|-------|-------|-------|-------|\n| 1     | 2     | 10    | 29    | 19    | 67    |\n| 2     | 3     | 11    | 31    | 20    | 71    |\n| 3     | 5     | 12    | 37    | 21    | 73    |\n| 4     | 7     | 13    | 41    | 22    | 79    |\n| 5     | 11    | 14    | 43    | 23    | 83    |\n| 6     | 13    | 15    | 47    | 24    | 89    |\n| 7     | 17    | 16    | 53    | 25    | 97    |\n| 8     | 19    | 17    | 59    |       |       |\n| 9     | 23    | 18    | 61    |       |       |\n\n**Got:** A definitive answer (prime or composite) with the algorithm used and any witnesses or divisors found.\n\n**If fail:** If Miller-Rabin reports \"probably prime\" but certainty is required, escalate to a deterministic test (e.g., AKS or ECPP). For trial division, if computation is too slow, switch to Miller-Rabin.\n\n### Step 3: Apply Factorization (if task = factorization)\n\nFactor n completely into its prime power decomposition.\n\n1. **Extract small factors by trial division**:\n   - Divide out 2 as many times as possible, recording the exponent.\n   - Divide out odd primes 3, 5, 7, 11, ... up to a cutoff (e.g., 10^4 or sqrt(n) if n is small).\n   - After each division, update n to the remaining cofactor.\n\n2. **If cofactor > 1 and cofactor \u003C 10^12**: Continue trial division up to sqrt(cofactor).\n\n3. **If cofactor > 1 and cofactor >= 10^12**: Apply Pollard's rho algorithm.\n   - Choose f(x) = x^2 + c (mod n) with random c.\n   - Use Floyd's cycle detection: x = f(x), y = f(f(y)).\n   - Compute d = gcd(|x - y|, n) at each step.\n   - If 1 \u003C d \u003C n, d is a non-trivial factor. Recurse on d and n\u002Fd.\n   - If d = n, retry with a different c.\n\n4. **Verify**: Multiply all found prime factors (with exponents) and confirm the product equals the original n. Test each factor for primality.\n\n5. **Present the result** in standard form: n = p1^a1 * p2^a2 * ... * pk^ak with p1 \u003C p2 \u003C ... \u003C pk.\n\n**Algorithm complexity notes:**\n\n| Algorithm       | Complexity                  | Best for              |\n|-----------------|-----------------------------|-----------------------|\n| Trial division  | O(sqrt(n))                  | n \u003C 10^12             |\n| Pollard's rho   | O(n^{1\u002F4}) expected         | n up to ~10^18        |\n| Quadratic sieve | L(n)^{1+o(1)}              | n up to ~10^50        |\n| GNFS            | L(n)^{(64\u002F9)^{1\u002F3}+o(1)}  | n > 10^50             |\n\n**Got:** A complete prime factorization in canonical form, verified by multiplication.\n\n**If fail:** If Pollard's rho fails to find a factor after many iterations (cycle detected without a non-trivial gcd), try different values of c (at least 5 attempts). If all fail, the cofactor may be prime -- confirm with a primality test.\n\n### Step 4: Apply Distribution Analysis (if task = distribution)\n\nAnalyze the distribution of primes up to a given bound N.\n\n1. **Generate primes using the Sieve of Eratosthenes**:\n   - Create a boolean array of size N + 1, initialized to true.\n   - Set indices 0 and 1 to false (not prime).\n   - For each p from 2 to floor(sqrt(N)):\n     - If p is still marked true, mark all multiples p^2, p^2 + p, p^2 + 2p, ... as false.\n   - Collect all indices still marked true.\n\n2. **Count primes**: Compute pi(N) = number of primes up to N.\n\n3. **Compare with the Prime Number Theorem**:\n   - PNT approximation: pi(N) ~ N \u002F ln(N).\n   - Logarithmic integral approximation: Li(N) = integral from 2 to N of 1\u002Fln(t) dt.\n   - Compute the relative error: |pi(N) - N\u002Fln(N)| \u002F pi(N).\n\n4. **Analyze prime gaps** (optional):\n   - Compute gaps between consecutive primes.\n   - Report the maximum gap, average gap, and any twin primes (gap = 2).\n   - Average gap near N is approximately ln(N).\n\n5. **Present findings** in a summary table:\n\n```\nBound N:       1,000,000\npi(N):         78,498\nN\u002Fln(N):       72,382\nLi(N):         78,628\nRelative error (N\u002Fln(N)):  7.79%\nRelative error (Li(N)):    0.17%\nMax prime gap:  148 (between 492113 and 492227)\nTwin primes:    8,169 pairs\n```\n\n**Got:** A count of primes with PNT comparison and optional gap analysis.\n\n**If fail:** If N is too large for in-memory sieving (N > 10^9), use a segmented sieve that processes the range in blocks. If only a count is needed (not a list), use the Meissel-Lehmer algorithm for pi(N) directly.\n\n### Step 5: Verify Results Computationally\n\nCross-check all results using an independent computation method.\n\n1. **For primality**: If trial division was used, verify with a quick Miller-Rabin pass (or vice versa). For known primes, check against published prime tables or OEIS sequences.\n\n2. **For factorization**: Multiply all factors and confirm equality with the original input. Independently test each claimed prime factor for primality.\n\n3. **For distribution**: Spot-check by testing 3-5 individual numbers from the sieve output for primality. Compare pi(N) against published values for standard benchmarks (pi(10^k) for k = 1, ..., 9).\n\n**Published values of pi(N):**\n\n| N       | pi(N)        |\n|---------|-------------|\n| 10      | 4           |\n| 100     | 25          |\n| 1,000   | 168         |\n| 10,000  | 1,229       |\n| 100,000 | 9,592       |\n| 10^6    | 78,498      |\n| 10^7    | 664,579     |\n| 10^8    | 5,761,455   |\n| 10^9    | 50,847,534  |\n\n4. **Document the verification** with the method used and the outcome.\n\n**Got:** All results independently verified with no discrepancies.\n\n**If fail:** If verification reveals a discrepancy, re-run the original computation with extra checks enabled (e.g., verbose trial division logging). The most common errors are off-by-one in sieve bounds, integer overflow in modular arithmetic, and mistaking a pseudoprime for a prime.\n\n## Validation\n\n- [ ] Task type is correctly classified (primality, factorization, or distribution)\n- [ ] Algorithm is appropriate for the input size\n- [ ] Trivial cases (n \u003C 2, n = 2, even n) are handled before general algorithms\n- [ ] Primality verdicts are definitive (not \"probably prime\" without qualification)\n- [ ] Factorizations multiply back to the original number\n- [ ] Every claimed prime factor has been tested for primality\n- [ ] Sieve bounds include sqrt(N) coverage for marking composites\n- [ ] PNT comparison uses the correct formula (N\u002Fln(N) or Li(N))\n- [ ] Results are verified by an independent method or against published values\n- [ ] Edge cases (n = 0, 1, 2, negative inputs) are addressed\n\n## Pitfalls\n\n- **Forgetting n = 1 is not prime**: By convention, 1 is neither prime nor composite. Many algorithms silently misclassify it.\n\n- **Integer overflow in modular exponentiation**: When computing a^d mod n for Miller-Rabin, naive exponentiation overflows. Use modular exponentiation (repeated squaring with mod at each step).\n\n- **Sieve off-by-one errors**: The sieve must mark composites starting from p^2, not from 2p. Starting from 2p wastes time but is correct; starting from p+1 is wrong.\n\n- **Pollard's rho cycle with d = n**: If gcd(|x - y|, n) = n, the algorithm has found the trivial factor. Retry with a different polynomial constant c, not a different starting point.\n\n- **Carmichael numbers fooling Fermat's test**: Numbers like 561 = 3 * 11 * 17 pass Fermat's primality test for all coprime bases. Always use Miller-Rabin, not plain Fermat.\n\n- **Confusing pi(n) with the constant pi**: The prime counting function pi(n) and the circle constant 3.14159... share notation. Context must be unambiguous.\n\n## Related Skills\n\n- `solve-modular-arithmetic` -- Modular arithmetic underpins Miller-Rabin and many factorization methods\n- `explore-diophantine-equations` -- Prime factorization is a prerequisite for solving many Diophantine equations\n- `formulate-quantum-problem` -- Shor's algorithm for integer factorization connects primes to quantum computing\n","# Analyze Prime Numbers\n\nAnalyze prime numbers by selecting and applying the appropriate algorithm for the task at hand: primality testing, integer factorization, or prime distribution analysis. Verify results computationally and relate findings to the Prime Number Theorem.\n\n## When to Use\n\n- Determining whether a given integer is prime or composite\n- Finding the complete prime factorization of an integer\n- Counting or listing primes up to a given bound\n- Verifying the Prime Number Theorem approximation for a specific range\n- Investigating properties of primes in a number-theoretic proof or computation\n\n## Inputs\n\n- **Required**: The integer(s) to analyze, or a bound for distribution analysis\n- **Required**: Task type -- one of: primality test, factorization, or distribution analysis\n- **Optional**: Preferred algorithm (trial division, Miller-Rabin, Sieve of Eratosthenes, Pollard's rho)\n- **Optional**: Whether to produce a formal proof of primality or a computational verdict\n- **Optional**: Output format (factor tree, prime list, count, table)\n\n## Procedure\n\n### Step 1: Determine the Task Type\n\nClassify the request into one of three categories and select the appropriate algorithmic path.\n\n1. **Primality test**: Given a single integer n, determine whether n is prime.\n2. **Factorization**: Given a composite integer n, find its complete prime factorization.\n3. **Distribution analysis**: Given a bound N, analyze the primes up to N (count, list, gaps, density).\n\nRecord the task type and the input value(s).\n\n**Got:** A clear classification with the input values recorded.\n\n**If fail:** If the input is ambiguous (e.g., \"analyze 60\"), ask the user to clarify whether they want a primality test, factorization, or distribution analysis. Default to factorization for composite numbers and primality confirmation for suspected primes.\n\n### Step 2: Apply Primality Testing (if task = primality)\n\nTest whether n is prime using an algorithm matched to the size of n.\n\n1. **Handle trivial cases**: n \u003C 2 is not prime. n = 2 or n = 3 is prime. If n is even and n > 2, it is composite.\n\n2. **Small n (n \u003C 10^6)**: Use trial division.\n   - Test divisibility by all primes p up to floor(sqrt(n)).\n   - Optimization: test 2, then odd numbers 3, 5, 7, ... or use a 6k +\u002F- 1 wheel.\n   - If no divisor found, n is prime.\n\n3. **Large n (n >= 10^6)**: Use Miller-Rabin probabilistic test.\n   - Write n - 1 = 2^s * d where d is odd.\n   - For each witness a in {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37}:\n     - Compute x = a^d mod n.\n     - If x = 1 or x = n - 1, this witness passes.\n     - Otherwise, square x up to s - 1 times. If x ever equals n - 1, pass.\n     - If no pass, n is composite (a is a witness).\n   - For n \u003C 3.317 * 10^24, the witnesses {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37} give a deterministic result.\n\n4. **Record the verdict**: prime or composite, with the witness or certificate.\n\n**Small primes reference (first 25):**\n\n| Index | Prime | Index | Prime | Index | Prime |\n|-------|-------|-------|-------|-------|-------|\n| 1     | 2     | 10    | 29    | 19    | 67    |\n| 2     | 3     | 11    | 31    | 20    | 71    |\n| 3     | 5     | 12    | 37    | 21    | 73    |\n| 4     | 7     | 13    | 41    | 22    | 79    |\n| 5     | 11    | 14    | 43    | 23    | 83    |\n| 6     | 13    | 15    | 47    | 24    | 89    |\n| 7     | 17    | 16    | 53    | 25    | 97    |\n| 8     | 19    | 17    | 59    |       |       |\n| 9     | 23    | 18    | 61    |       |       |\n\n**Got:** A definitive answer (prime or composite) with the algorithm used and any witnesses or divisors found.\n\n**If fail:** If Miller-Rabin reports \"probably prime\" but certainty is required, escalate to a deterministic test (e.g., AKS or ECPP). For trial division, if computation is too slow, switch to Miller-Rabin.\n\n### Step 3: Apply Factorization (if task = factorization)\n\nFactor n completely into its prime power decomposition.\n\n1. **Extract small factors by trial division**:\n   - Divide out 2 as many times as possible, recording the exponent.\n   - Divide out odd primes 3, 5, 7, 11, ... up to a cutoff (e.g., 10^4 or sqrt(n) if n is small).\n   - After each division, update n to the remaining cofactor.\n\n2. **If cofactor > 1 and cofactor \u003C 10^12**: Continue trial division up to sqrt(cofactor).\n\n3. **If cofactor > 1 and cofactor >= 10^12**: Apply Pollard's rho algorithm.\n   - Choose f(x) = x^2 + c (mod n) with random c.\n   - Use Floyd's cycle detection: x = f(x), y = f(f(y)).\n   - Compute d = gcd(|x - y|, n) at each step.\n   - If 1 \u003C d \u003C n, d is a non-trivial factor. Recurse on d and n\u002Fd.\n   - If d = n, retry with a different c.\n\n4. **Verify**: Multiply all found prime factors (with exponents) and confirm the product equals the original n. Test each factor for primality.\n\n5. **Present the result** in standard form: n = p1^a1 * p2^a2 * ... * pk^ak with p1 \u003C p2 \u003C ... \u003C pk.\n\n**Algorithm complexity notes:**\n\n| Algorithm       | Complexity                  | Best for              |\n|-----------------|-----------------------------|-----------------------|\n| Trial division  | O(sqrt(n))                  | n \u003C 10^12             |\n| Pollard's rho   | O(n^{1\u002F4}) expected         | n up to ~10^18        |\n| Quadratic sieve | L(n)^{1+o(1)}              | n up to ~10^50        |\n| GNFS            | L(n)^{(64\u002F9)^{1\u002F3}+o(1)}  | n > 10^50             |\n\n**Got:** A complete prime factorization in canonical form, verified by multiplication.\n\n**If fail:** If Pollard's rho fails to find a factor after many iterations (cycle detected without a non-trivial gcd), try different values of c (at least 5 attempts). If all fail, the cofactor may be prime -- confirm with a primality test.\n\n### Step 4: Apply Distribution Analysis (if task = distribution)\n\nAnalyze the distribution of primes up to a given bound N.\n\n1. **Generate primes using the Sieve of Eratosthenes**:\n   - Create a boolean array of size N + 1, initialized to true.\n   - Set indices 0 and 1 to false (not prime).\n   - For each p from 2 to floor(sqrt(N)):\n     - If p is still marked true, mark all multiples p^2, p^2 + p, p^2 + 2p, ... as false.\n   - Collect all indices still marked true.\n\n2. **Count primes**: Compute pi(N) = number of primes up to N.\n\n3. **Compare with the Prime Number Theorem**:\n   - PNT approximation: pi(N) ~ N \u002F ln(N).\n   - Logarithmic integral approximation: Li(N) = integral from 2 to N of 1\u002Fln(t) dt.\n   - Compute the relative error: |pi(N) - N\u002Fln(N)| \u002F pi(N).\n\n4. **Analyze prime gaps** (optional):\n   - Compute gaps between consecutive primes.\n   - Report the maximum gap, average gap, and any twin primes (gap = 2).\n   - Average gap near N is approximately ln(N).\n\n5. **Present findings** in a summary table:\n\n```\nBound N:       1,000,000\npi(N):         78,498\nN\u002Fln(N):       72,382\nLi(N):         78,628\nRelative error (N\u002Fln(N)):  7.79%\nRelative error (Li(N)):    0.17%\nMax prime gap:  148 (between 492113 and 492227)\nTwin primes:    8,169 pairs\n```\n\n**Got:** A count of primes with PNT comparison and optional gap analysis.\n\n**If fail:** If N is too large for in-memory sieving (N > 10^9), use a segmented sieve that processes the range in blocks. If only a count is needed (not a list), use the Meissel-Lehmer algorithm for pi(N) directly.\n\n### Step 5: Verify Results Computationally\n\nCross-check all results using an independent computation method.\n\n1. **For primality**: If trial division was used, verify with a quick Miller-Rabin pass (or vice versa). For known primes, check against published prime tables or OEIS sequences.\n\n2. **For factorization**: Multiply all factors and confirm equality with the original input. Independently test each claimed prime factor for primality.\n\n3. **For distribution**: Spot-check by testing 3-5 individual numbers from the sieve output for primality. Compare pi(N) against published values for standard benchmarks (pi(10^k) for k = 1, ..., 9).\n\n**Published values of pi(N):**\n\n| N       | pi(N)        |\n|---------|-------------|\n| 10      | 4           |\n| 100     | 25          |\n| 1,000   | 168         |\n| 10,000  | 1,229       |\n| 100,000 | 9,592       |\n| 10^6    | 78,498      |\n| 10^7    | 664,579     |\n| 10^8    | 5,761,455   |\n| 10^9    | 50,847,534  |\n\n4. **Document the verification** with the method used and the outcome.\n\n**Got:** All results independently verified with no discrepancies.\n\n**If fail:** If verification reveals a discrepancy, re-run the original computation with extra checks enabled (e.g., verbose trial division logging). The most common errors are off-by-one in sieve bounds, integer overflow in modular arithmetic, and mistaking a pseudoprime for a prime.\n\n## Validation\n\n- [ ] Task type is correctly classified (primality, factorization, or distribution)\n- [ ] Algorithm is appropriate for the input size\n- [ ] Trivial cases (n \u003C 2, n = 2, even n) are handled before general algorithms\n- [ ] Primality verdicts are definitive (not \"probably prime\" without qualification)\n- [ ] Factorizations multiply back to the original number\n- [ ] Every claimed prime factor has been tested for primality\n- [ ] Sieve bounds include sqrt(N) coverage for marking composites\n- [ ] PNT comparison uses the correct formula (N\u002Fln(N) or Li(N))\n- [ ] Results are verified by an independent method or against published values\n- [ ] Edge cases (n = 0, 1, 2, negative inputs) are addressed\n\n## Pitfalls\n\n- **Forgetting n = 1 is not prime**: By convention, 1 is neither prime nor composite. Many algorithms silently misclassify it.\n\n- **Integer overflow in modular exponentiation**: When computing a^d mod n for Miller-Rabin, naive exponentiation overflows. Use modular exponentiation (repeated squaring with mod at each step).\n\n- **Sieve off-by-one errors**: The sieve must mark composites starting from p^2, not from 2p. Starting from 2p wastes time but is correct; starting from p+1 is wrong.\n\n- **Pollard's rho cycle with d = n**: If gcd(|x - y|, n) = n, the algorithm has found the trivial factor. Retry with a different polynomial constant c, not a different starting point.\n\n- **Carmichael numbers fooling Fermat's test**: Numbers like 561 = 3 * 11 * 17 pass Fermat's primality test for all coprime bases. Always use Miller-Rabin, not plain Fermat.\n\n- **Confusing pi(n) with the constant pi**: The prime counting function pi(n) and the circle constant 3.14159... share notation. Context must be unambiguous.\n\n## Related Skills\n\n- `solve-modular-arithmetic` -- Modular arithmetic underpins Miller-Rabin and many factorization methods\n- `explore-diophantine-equations` -- Prime factorization is a prerequisite for solving many Diophantine equations\n- `formulate-quantum-problem` -- Shor's algorithm for integer factorization connects primes to quantum computing\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"number-theory, primes, primality, factorization, sieve","Philipp Thoss","number-theory","1.0","multi","intermediate","Julius Brussee homage — caveman","Analyze prime numbers using primality tests, factorization algorithms, prime distribution analysis, and sieve methods. Covers trial division, Miller-Rabin, Sieve of Eratosthenes, and the Prime Number Theorem. Use when determining whether an integer is prime or composite, finding prime factorizations, counting or listing primes up to a bound, or investigating prime properties within a number-theoretic proof or computation.\n","Read Bash","82c77053","en","2026-04-19","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fanalyze-prime-numbers",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill analyze-prime-numbers",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill analyze-prime-numbers",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill analyze-prime-numbers","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fanalyze-prime-numbers\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]