Learn R Programming

pracma (version 1.1.6)

omega: Number of Prime Factors

Description

Sum of all exponents of prime factors in the prime decomposition.

Usage

omega(n)
Omega(n)

Arguments

n
Positive integer.

Value

  • Natural number, some of exponents.

Details

Compute the number of prime factors of n resp. the sum of their exponents in the prime decomposition.

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

See Also

factorize, sigma

Examples

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

Run the code above in your browser using DataLab