Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

omega

Number of Prime Factors


Description

Number of prime factors resp. sum of all exponents of prime factors in the prime decomposition.

Usage

omega(n)
Omega(n)

Arguments

n

Positive integer.

Details

'omega(n)' returns the number of prime factors of 'n' while 'Omega(n)' returns the sum of their exponents in the prime decomposition. 'omega' and 'Omega' are identical if there are no quadratic factors.

Remark: (-1)^Omega(n) is the Liouville function.

Value

Natural number.

Note

Works well up to 10^9.

See Also

Examples

omega(2*3*5*7*11*13*17*19)  #=> 8
Omega(2 * 3^2 * 5^3 * 7^4)  #=> 10

numbers

Number-Theoretic Functions

v0.8-1
GPL (>= 3)
Authors
Hans Werner Borchers
Initial release
2021-04-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.