Total number of prime factors Created 2026-10-06 Updated 2026-10-13
The total number of prime factors counts every occurrence of a prime factor in the prime factorization of a positive integer . Equivalently, it adds the prime valuations:
One may also write over all prime numbers, since only finitely many prime valuations are nonzero. The empty sum gives . By contrast, the prime omega function has and counts distinct prime factors. [ref]
Expanding into shows , whereas and . The same calculation for the comparison examples gives
The total number of prime factors agrees for and , although their prime supports of an integer differ. Meanwhile and have the same radical of an integer and prime omega function, but different values of the total number of prime factors. These examples show exactly which information each arithmetic function forgets.
Figure 1.
One box per prime factor occurrence: the total number of prime factors counts boxes, the prime omega function counts groups, and the radical of an integer multiplies one prime number from each group
. Details.
The total number of prime factors is a completely additive arithmetic function:
The proof is that multiplication adds each prime valuation, , and summing preserves that equality. No coprimality condition is needed. For example, and both have total number of prime factors three; their product has six. By comparison, the prime omega function is only an additive arithmetic function: here .
There is a useful way to see the total number of prime factors as a count of elementary building blocks: any expression of as a product of prime numbers has exactly factors, by the fundamental theorem of arithmetic. Equivalently, every factorization tree for has leaves. Repeated prime factors increase this count without introducing new kinds of prime number. The difference is the existing excess prime-factor multiplicity:
Every summand is nonnegative, so if and only if is a squarefree integer, including . In particular, a prime power with has , and .
Historically, Hardy and Ramanujan's 1917 paper explicitly separated the prime omega function from the total number of prime factors, writing them as and , respectively. Their example has counts three and six. That distinction let them compare two measures of how an integer is built from prime factors. [ref]
The prime omega function has normal order . The elementary second-moment estimate
already proves concentration on every scale larger than .