{"uid":"cap_kI1x1nQUiSogNrJ_IyuQi","slug":"prime-factorization-and-number-theory-analysis-24870f29","name":"Prime Factorization and Number Theory Analysis","description":"Primality test and prime factorization of integers up to 10^19, with divisor count, divisor sum, Euler totient and number type.","url":"https://math-stats.x402tookit.com/prime-factor?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["n"],"properties":{"n":{"type":"integer","description":"Integer from 2 to 10^19"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"n":{"type":["null","string"]},"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"factors":{"type":["array","null"],"items":{"type":"object","properties":{"prime":{"type":["null","string"]},"exponent":{"type":["null","number"]}}}},"isPrime":{"type":["boolean","null"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"totient":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"aliquotSum":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"divisorSum":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"numberType":{"type":["null","string"]},"squareFree":{"type":["boolean","null"]},"divisorCount":{"type":["null","string"]},"factorization":{"type":["null","string"]},"distinctPrimes":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pyqqRdMO_c7bDlWvD2mZN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs primality testing and prime factorization of integers up to 10^19, returning factors, divisor count, divisor sum, Euler totient, and number type classification.","exampleAgentPrompt":"Can you factorize 9007199254740997 and tell me if it's prime, along with its Euler totient, divisor count, and number type?","exampleUseCases":[{"title":"Primality check for cryptographic key","prompt":"Is 18446744073709551557 a prime number? Also give me its prime factorization and Euler totient if it's not."},{"title":"Divisor analysis for a math puzzle","prompt":"How many divisors does 720720 have, and what is their sum? Also tell me whether it's square-free."},{"title":"Number type classification for a school project","prompt":"What kind of number is 28 — is it perfect, abundant, or deficient? Can you also show me its prime factors and aliquot sum?"}],"resultDescription":"Returns the integer n, a list of prime factors with their exponents, a formatted factorization string, whether n is prime, the count and sum of all divisors, the aliquot sum, the Euler totient, the number type classification (e.g. prime, perfect, abundant, deficient), a square-free flag, count of distinct primes, and optional degraded/disclaimer fields indicating any limitations.","failureModes":["n out of range (below 2 or above 10^19) returns error or null fields","non-integer or missing n parameter causes validation failure","very large semi-primes near 10^19 may trigger degraded mode with partial results","network timeout for computationally intensive inputs"],"whenToPreferThis":"Use this endpoint when you need rigorous number-theoretic properties — primality, factorization, totient, divisor statistics — for integers up to 10^19. Prefer it over general-purpose math libraries when you need a hosted, pay-per-call solution with structured JSON output covering multiple number properties in a single call. Particularly valuable for cryptographic validation, competitive programming assistance, and educational tools.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:13:43.176Z","isFirstParty":false,"canonicalSlug":"prime-factorization-and-number-theory-analysis-24870f29"}