math_number_theory
Compute number theory results: factor integers, test primality, find GCD/LCM, list primes, and apply Chinese remainder theorem.
Instructions
数论运算。
value: 整数值或参数,取决于 operation: 因式分解/factor:'1234567890' GCD/LCM:'1234,5678' 素数范围:'2,100' 离散对数:'base,value,modulus' 中国剩余定理:'r1,m1;r2,m2;...' operation: factor — 质因数分解 isprime — 素数判定 nextprime — 下一个素数 prevprime — 前一个素数 totient — 欧拉函数 φ(n) divisors — 所有因子 primitiveroot — 最小原根 gcd — 最大公约数 lcm — 最小公倍数 fibonacci — 第 n 个斐波那契数 bernoulli — 第 n 个伯努利数 npartitions — 整数分拆数 primorial — 素数阶乘(前 n 个素数之积) primepi — ≤ n 的素数个数 prime — 第 n 个素数 primerange — 范围内素数列表(格式 'a,b') crt — 中国剩余定理(格式 'r1,m1;r2,m2;...') legendre — Legendre 符号 (a|p),格式 'a,p' jacobi — Jacobi 符号 (a|n),格式 'a,n'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| operation | No | factor |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |