API · /numbertheory-api

Number Theory API

healthy 4,587 Subscribers

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
Get an API key Try in playground → Contact provider

Machine-readable spec so AI agents can integrate this API.

/api/numbertheory-api/openapi.json
/api/numbertheory-api/llms.txt

Discovery: GET /api/index.json lists every API.

API health

healthy
Uptime
100.00%
Server probes · 24h
Avg latency
80 ms
Server probes · 24h
Subscribers
4,587
active
Total calls
76
last 7 days
status Full status page → · 12 probes/24h

Pricing

Pick a tier — billed monthly, cancel anytime.

Free

Free

  • 1,135 calls / month
  • 2 requests / second
  • Hard cap (429 above quota, no overage)
  • 1,135 calls/month
  • 2 req/sec
  • Factorize + gcd/lcm + primality
  • No credit card
Sign in to subscribe

Starter

€1.75 /month

  • 9,750 calls / month
  • 8 requests / second
  • Hard cap (429 above quota, no overage)
  • 9.75k calls/month
  • 8 req/sec
  • Divisors + perfect numbers
  • Email support
Sign in to subscribe

Pro

€21.65 /month

  • 148,500 calls / month
  • 20 requests / second
  • Hard cap (429 above quota, no overage)
  • 148.5k calls/month
  • 20 req/sec
  • Education / crypto-demo pipelines
  • Priority support
Sign in to subscribe

Mega

€59.65 /month

  • 785,000 calls / month
  • 50 requests / second
  • Hard cap (429 above quota, no overage)
  • 785k calls/month
  • 50 req/sec
  • Platform scale
  • Dedicated SLA
Sign in to subscribe

Built by

Related APIs

Other APIs with overlapping tags.

Collatz Sequence API

The Collatz conjecture (the "3n+1" or hailstone problem) as an API, computed locally and deterministically. Give it any positive integer and the sequence endpoint returns the full hailstone path — at each step an even number is halved and an odd number is tripled and incremented (3n+1) — together with the total stopping time (the number of steps to reach 1) and the peak value the sequence climbs to. Starting from 6 the path is 6, 3, 10, 5, 16, 8, 4, 2, 1 — eight steps, peaking at 16; the notoriously long start 27 takes 111 steps and soars to a peak of 9232 before collapsing. The steps endpoint returns just the stopping time and peak altitude without the whole path, for fast bulk scans of where the big climbs and long tails are. All arithmetic runs in arbitrary-precision integers so the peak stays exact even when a small starting number balloons into the millions, and a safety cap keeps every request bounded. Starting numbers up to one hundred trillion are accepted. Everything is computed locally and deterministically, so it is instant and private. Ideal for maths-education, number-theory, recreational-mathematics and puzzle app developers, sequence-and-hailstone visualisers, and teaching material on the most famous unsolved problem in arithmetic. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 compute endpoints. This is the Collatz/3n+1 sequence specifically; for prime factorisation or GCD use a number-theory API.

api.oanor.com/collatz-api

Number Sequences API

Generate famous integer sequences and test membership, with exact big-integer maths. The generate endpoint returns the first N terms of a sequence — Fibonacci, Lucas, prime numbers, triangular, square, cube, factorial, Catalan, pentagonal and tetrahedral numbers, plus parameterised arithmetic (a start and a step), geometric (a start and a ratio) and powers (any base). The contains endpoint tells you whether a given number belongs to a sequence — is 233 a Fibonacci number, is 21 triangular, is 97 prime, is 720 a factorial — using fast closed-form tests for primes, squares, cubes, triangular, pentagonal and Fibonacci numbers and an exact search for the rest, and it returns the term index where it is known. Because everything is computed with arbitrary-precision integers, terms beyond the usual floating-point limit are returned exactly as decimal strings and never overflow. It runs entirely locally, so it is instant, deterministic and private. Ideal for education and maths tooling, coding challenges and puzzles, test-data generation, recreational mathematics and number-theory experiments. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This generates and tests integer sequences; to factorize a single number or get its divisors use a number-theory API.

api.oanor.com/sequences-api

Combinatorics API

Combinatorics maths as an API, computed locally and deterministically with exact arbitrary-precision integers. The factorial endpoint computes n! = 1·2·3···n (with 0! = 1) and returns it exactly as a string together with its digit count, so even very large factorials stay precise. The permutations endpoint counts ordered arrangements: without repetition nPr = n!/(n−r)! arrangements of r items chosen from n, and with repetition n^r, where each of the r positions may be any of the n items. The combinations endpoint counts unordered selections: without repetition the binomial coefficient nCr = n!/(r!·(n−r)!), and with repetition (multisets) C(n+r−1, r), where repeats are allowed. All results are computed with BigInt so they are exact no matter how large, returned as a string with the number of digits and a floating-point approximation when it fits. n and r are non-negative integers up to 100000. Everything is computed locally and deterministically, so it is instant and private. Ideal for probability, statistics, lottery, game-design, cryptography and education app developers, counting and odds tools, and discrete-maths teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is counting combinatorics; for modular arithmetic use a modular API and for descriptive statistics a statistics API.

api.oanor.com/combinatorics-api

Modular Arithmetic API

Modular-arithmetic maths as an API, computed locally and deterministically with exact big-integer arithmetic. The power endpoint computes modular exponentiation, aᵇ mod m, by square-and-multiply, fast and exact even for the huge exponents used in cryptography. The inverse endpoint finds the modular multiplicative inverse a⁻¹ mod m with the extended Euclidean algorithm, returning the inverse when a and m are coprime and reporting the gcd when no inverse exists. The totient endpoint computes Euler's totient φ(n) — the count of integers from 1 to n coprime to n — with the prime factorization it comes from, and an optional Euler-theorem check that a^φ(n) ≡ 1 (mod n) for a coprime base. These are the building blocks of RSA and much of modern cryptography. Inputs are integers and can be passed as strings for very large values. Everything is computed locally and deterministically, so it is instant and private. Ideal for cryptography, security, blockchain and mathematics app developers, RSA and number-theory tools, and computer-science education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is modular arithmetic; for prime factorization and GCD use a number-theory API and for integer sequences a sequences API.

api.oanor.com/modular-api

Frequently asked questions

Quick answers about pricing, quotas, and integration.

How do I get an API key for Number Theory API?
Sign up for free at oanor.com, generate an API key from the developer dashboard, and call Number Theory API with the x-oanor-key header. No credit card needed for the free tier.
What's the rate limit for Number Theory API?
Free tier allows 1 request per second. Paid plans scale up to 50 requests per second on the Mega tier. Hard limits return HTTP 429 above the quota — no surprise overage charges.
How much does Number Theory API cost?
Number Theory API has a free tier with 100 calls / month. Paid plans start at €1.75 / month with higher quotas and faster rate limits.
Can I cancel my subscription anytime?
Yes. Plans are billed monthly and you can cancel anytime from your billing dashboard. No long-term contracts and no cancellation fee.
Is Number Theory API GDPR-compliant?
All requests to Number Theory API go through our EU-based gateway. Your upstream API key never leaves our server and no personal data is shared with the upstream provider beyond the request you send.

Pick an endpoint from the list on the left to see its details and try it.

Code snippets

Sign up to get an API key, then call any path under your slug.

curl https://api.oanor.com/numbertheory-api/SOME_PATH \
  -H "x-oanor-key: oanor_test_..."
const res = await fetch("https://api.oanor.com/numbertheory-api/SOME_PATH", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
const data = await res.json();
$ch = curl_init("https://api.oanor.com/numbertheory-api/SOME_PATH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
$response = curl_exec($ch);
import requests
r = requests.get(
    "https://api.oanor.com/numbertheory-api/SOME_PATH",
    headers={"x-oanor-key": "oanor_test_..."},
)
print(r.json())

Ratings

Sign in to rate.

No reviews yet.

Discussion

Ask questions, share usage tips, get answers from the provider and other developers. Public — anyone can read.

Sign in to start a thread or reply.

Sign in

New thread

/ 4000

📌 Pinned 🔒 Locked

·

· ·

/ 4000

🔒 This thread is locked — no new replies.

  • No threads yet — start the discussion.

Support

Private 1:1 support with the provider — billing questions, integration issues, account problems. Only you and the provider team can see these threads.

Sign in to open a support ticket.

Sign in

Open new ticket

Describe what you need help with. The provider team gets an email and replies on the ticket page.

  • No tickets yet for this API.

Subscription active — calls can start immediately.

Send your first request —

Subscription active — copy a snippet and fire off your first call.