Loading…

Number of Prime Factors

Math Algebra • Numbers

View all topics

Count the number of prime factors of an integer in two different ways: \[ \begin{aligned} \omega(n) &= \text{number of distinct prime factors},\\ \Omega(n) &= \text{total number of prime factors counted with multiplicity}. \end{aligned} \] Example: \[ \begin{aligned} 360=2^3\cdot3^2\cdot5 \quad\Rightarrow\quad \omega(360)=3,\qquad \Omega(360)=6. \end{aligned} \]

Number input

Use an integer with \(|n|\le 10^{12}\). For a negative integer, the calculator factors out \(-1\) and counts the prime factors of \(|n|\). The numbers \(0\), \(1\), and \(-1\) do not have ordinary prime factorizations.

Quick examples

Ready
Enter a number, then click “Calculate”.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What is omega(n)?

omega(n) counts the number of distinct prime factors of n. Repeated copies of the same prime are counted only once.

What is Omega(n)?

Omega(n) counts the total number of prime factors of n with multiplicity. Repeated prime factors are counted separately.

What is the difference between omega(n) and Omega(n)?

omega(n) counts different prime bases, while Omega(n) counts every repeated prime factor. For 360 = 2^3 × 3^2 × 5, omega(360) = 3 and Omega(360) = 6.

What are omega(n) and Omega(n) for 360?

Since 360 = 2^3 × 3^2 × 5, the distinct primes are 2, 3, and 5, so omega(360) = 3. The exponents add to 3 + 2 + 1 = 6, so Omega(360) = 6.

What are omega(n) and Omega(n) for a prime number?

If n is prime, then omega(n) = 1 and Omega(n) = 1.

When are omega(n) and Omega(n) equal?

They are equal when n is square-free, meaning no prime factor repeats.

Can negative numbers be used?

Yes. The calculator factors out -1 first and counts the prime factors of the absolute value. The factor -1 is not counted as prime.

Are 0 and 1 supported?

They can be entered, but the calculator explains that they do not have ordinary prime factorizations, so omega(n) and Omega(n) are not defined in the usual elementary sense.

How does the calculator find the factorization?

It uses repeated division by increasing primes, starting with 2 and then checking odd divisors.

Why does 2^3 contribute 3 to Omega(n)?

Because 2^3 means 2 × 2 × 2, which contains three prime factors when multiplicity is counted.