ForHosting KIT · Math

Prime factor count with multiplicity

Counts every prime factor of n, repeats included: 12 is 2 × 2 × 3, so Ω(12) is 3, while its distinct primes ω(12) are only 2. You also see the prime powers, so you can check that the exponents add up. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
N
12
You get
Big omega
3
Omega big
3
Little omega
2

Big omega Ω(n) counts every prime factor of a positive integer n with multiplicity: if twelve factors as two squared times three, then Ω(12) equals three because the primes are two, two, and three. This calculator returns that total after a deterministic trial-division factorization, plus the ordered prime powers and little omega ω(n) for comparison. Students, contest programmers, and pipeline authors use Ω(n) when they need the length of the multiset of prime factors rather than the list of divisors or a full factorization landing.

Big omega versus little omega and factorization

Number theory distinguishes two closely related counts. Little omega ω(n) is the number of distinct prime factors: the size of the support of the prime factorization. Big omega Ω(n) is the total number of prime factors counted with multiplicity: the sum of the exponents in that same factorization.

For a square-free product of k distinct primes, the two functions agree and both equal k. For a prime power p to the e, little omega is one while big omega is e. For one, both are zero by the empty-product and empty-sum conventions.

Searchers who want the multiset size often type phrases such as prime factor count with multiplicity or big omega of n; that intent is different from requesting a full factorization table or only the distinct-prime count. This capability is built for that multiset-length question. It still returns the factorization so you can verify that the sum of exponents equals the reported Ω(n), and it returns little omega so side-by-side comparisons do not require a second tool.

The algorithm is the classical one taught in elementary number theory courses: factor by trial division, then add the exponents.

Where multiplicity counts show up in real work

Contest problems often ask for the total number of prime factors in the multiset sense when analyzing the prime omega function, highly composite searches, or the additive properties of Ω under multiplication of coprime arguments. Teachers assign exercises that contrast Ω and ω on the same list of integers and need a deterministic oracle that shows intermediate prime powers. Cryptography and coding-theory homework sometimes uses the total exponent sum as a complexity measure for factorizations that appear in toy moduli.

Because the engine is pure parse code with no model drift, no network dependency, and no stored state, the same n always produces the same response. Use the free browser tool for quick checks, then call the identical contract from scripts when you need bulk verification. If you later need the full list of divisors, the divisor count τ(n), or a factorization-only landing with different SEO framing, treat those as separate search intents rather than overloading this multiplicity-focused page.

Homework and olympiad checks

Verify Ω(n) for worksheets that ask for the number of prime factors counted with multiplicity, with the prime powers shown so the exponent sum can be inspected.

Contrast with little omega

Return both big omega and little omega on the same factorization so students and pipelines can compare multiset length versus distinct-prime count without a second call.

What is big omega Ω(n)?

Ω(n) is the number of prime factors of n counted with multiplicity. If n = p1^e1 × … × pk^ek, then Ω(n) = e1 + … + ek. For example Ω(12) = Ω(2²×3) = 3.

How does Ω(n) differ from little omega ω(n)?

Little omega ω(n) counts distinct primes (k in the factorization above). Big omega sums the exponents. For square-free n they agree; for prime powers they diverge.

Why is Ω(1) equal to 0?

By convention the empty prime factorization has an empty sum of exponents, so both Ω(1) and ω(1) are zero.

What does it cost?

The browser tool is free and runs locally.

What is Ω(n) for a prime power?

For a prime p raised to the power e, Ω is e, because the same prime is counted e times, while ω is 1. A prime on its own therefore gives 1 for both counts.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/numth/prime-factor-multiplicity

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/numth/prime-factor-multiplicity \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":12}'
{
  "n": 12
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.prime_factor_multiplicity",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

You send a positive integer; invalid values below one fail fast with invalid_input and are not charged.

What you send and what the response contains

Provide a positive integer n. Aliases number and value are accepted for form widgets and SDKs that prefer a friendlier field name. Values below one, non-integers, empty fields, and numbers larger than the JavaScript safe-integer maximum are rejected with invalid_input and do not consume prepaid balance. On success the JSON includes the normalized n, big_omega (and the alias omega_big with the same value), little_omega as the distinct-prime count, factorization as an ascending array of prime and exponent objects, and a short formula string documenting the identity used. Worked checks: twelve yields big_omega three and little_omega two because two squared times three contributes three prime factors with multiplicity and two distinct primes; a prime p yields one and one; a prime power p to the k yields k and one; n equals one yields zero and zero with an empty factorization. Pricing for successful API items is the published base of $0.002.

Deterministic pipeline fixtures

Call the same pure contract from scripts and CI so Ω(n) golden values never depend on a casual web form or a floating spreadsheet.

What values of n are accepted?

Integers from 1 through 9007199254740991 (Number.MAX_SAFE_INTEGER). Zero, negatives, decimals, and non-numeric strings fail with invalid_input and are not charged.

Read the full KIT documentation →