#number-theory
2 APIs con questa etichetta
Collatz Sequence API
Collatz 猜想("3n+1" 或冰雹问题)作为一个 API,在本地确定性地计算。给它任意正整数,序列端点返回完整的冰雹路径——每一步,偶数减半,奇数乘以 3 加 1(3n+1)——以及总停止时间(到达 1 所需的步数)和序列达到的峰值。从 6 开始,路径为 6, 3, 10, 5, 16, 8, 4, 2, 1——八步,峰值为 16;著名的长起始数 27 需要 111 步,峰值高达 9232 然后下降。steps 端点仅返回停止时间和峰值高度,不返回整个路径,用于快速批量扫描大攀升和长尾的位置。所有算术运算使用任意精度整数,因此即使小起始数膨胀到数百万,峰值也保持精确,并且安全上限确保每个请求有界。接受高达一百万亿的起始数。所有计算在本地确定性地进行,因此即时且私密。非常适合数学教育、数论、娱乐数学和谜题应用开发者、序列和冰雹可视化工具,以及关于算术中最著名未解决问题教学材料。纯本地计算——无需密钥,无需第三方服务,即时。实时,不存储任何内容。2 个计算端点。这是专门的 Collatz/3n+1 序列;对于质因数分解或 GCD,请使用数论 API。
api.oanor.com/collatz-api
Number Theory API
An integer toolkit as an API. Factorize any number into its prime factors with exponents (and a readable 2^3 × 3^2 × 5 form), with the divisor count, the divisor sum, the full list of divisors and whether the number is perfect; find the greatest common divisor and least common multiple of two numbers (and whether they are coprime); and test primality, returning the next and previous prime. Handles numbers up to a trillion. Perfect for maths education and puzzles, cryptography demos, generating test data and any time you need the building blocks of a number. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. A focused integer toolkit, distinct from a general math-expression engine.
api.oanor.com/numbertheory-api