number_theory
Solve exact integer and modular arithmetic problems, including primality, factorization, gcd, modular inverses, CRT, and Diophantine equations, with verifiable big-integer results.
Instructions
Integer and modular arithmetic with exact big integers: primality, factorization, divisors, totient, Mobius, primes, gcd/lcm/extended gcd, modular power/inverse/square root/log, primitive roots, Legendre/Jacobi, CRT, Diophantine equations, continued fractions, partitions, digits.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"operation": "<operation>"
},
"name": "number_theory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Exponent, index or base. | |
| m | No | Second integer or modulus. | |
| n | No | Main integer (decimal string allowed for big numbers). | |
| expr | No | Equation for diophantine; number for continued_fraction (e.g. 'sqrt(7)', '415/93'). | |
| limit | No | Max listed items. | |
| moduli | No | Moduli for crt. | |
| values | No | Integers for gcd/lcm, residues for crt. | |
| operation | Yes | ||
| variables | No | ||
| show_steps | No | Add numbered steps in Italian to result.steps. |