# Omega Function Calculator ω(n)

Omega Function Calculator
n =

In number theory, the number of distinct prime factors of an integer n is denoted by ω(n). For example, ω(6) = ω(12) = ω(18) = ω(24) = 2 since each of these numbers is the product of powers of 2 and 3.

Unlike other number theoretic functions, ω(n) is not multiplicative, however, it does satisfy the relation

ω(mn) = ω(m) + ω(n)

for relatively prime integers m and n. This is similar to the logarithm identity log(ab) = log(a) + log(b). The function 2ω(n) however is multiplicative:

2ω(mn) = 2ω(m)+ω(n) = (2ω(m))(2ω(n)).

The omega function plays a role in several number theoretic identities.

### Identities

For any positive integers n and x, ω(nx) = ω(n).

The number of square-free divisors of n is 2ω(n). To see why this is so, let P be the largest square-free divisor of n. P is simply the product of all the primes that divide n. Put another way, if you factor n into the products of its prime powers, P is the number you get when you replace every exponent with 1. Using the formula for σ₀(P), the number of divisors of P is 2ω(n). And the divisors of P are precisely the square-free divisors of n.

An infinite sum identity involving ω(n) is

Σ 2ω(n)/ns = ζ(s)²/ζ(2s),

where the n ranges from 1 to infinity and ζ(s) is the Riemann Zeta function given by

Σ 1/ns = ζ(s)

Let the multiplicative function G(n) be defined by expression

G(n) = Σ 2ω(d)

where d ranges over the divisors of n. If n = p1a1⋅p2a2⋅...⋅pkak, where the pi's are the prime factors and the ai's are their respective powers, then

G(n) = Π (2ai + 1)

where i ranges from 1 to k. (Necessarily, k = ω(n)).

### Some Special Values of ω(n)

For any power of 10, ω(10x) = 2 since 10 = 2 times 5. For factorials, ω(n!) simply equals the number of primes less than or equal to n. Example: ω(20!) = 8 since there are exactly 8 primes that do not exceed 20: 2, 3, 5, 7, 11, 13, 17, and 19.

The table below gives ω(n) for n = 1, 11, 111, etc.

 n Number of 1's ω(n) 1 1 0 11 2 1 111 3 2 1111 4 2 11111 5 2 111111 6 5 1111111 7 2 11111111 8 4 111111111 9 3 1111111111 10 4 11111111111 11 2 111111111111 12 7 1111111111111 13 3 11111111111111 14 4 111111111111111 15 6 1111111111111111 16 6 11111111111111111 17 2 111111111111111111 18 8 1111111111111111111 19 1 11111111111111111111 20 7 111111111111111111111 21 7 1111111111111111111111 22 6 11111111111111111111111 23 1 111111111111111111111111 24 10 1111111111111111111111111 25 5 11111111111111111111111111 26 6 111111111111111111111111111 27 5 1111111111111111111111111111 28 8 11111111111111111111111111111 29 5 111111111111111111111111111111 30 13 1111111111111111111111111111111 31 3 11111111111111111111111111111111 32 11 111111111111111111111111111111111 33 6 1111111111111111111111111111111111 34 6 11111111111111111111111111111111111 35 7