= Total number of prime factors
{title2=$\Omega(n)$}
= Prime omega function with multiplicity
{synonym}
The <total number of prime factors> $\Omega(n)$ counts every occurrence of a <prime factor> in the <prime factorization> of a <positive integer> $n$. Equivalently, it adds the <prime valuations>:
$$
n=p_1^{a_1}\cdots p_r^{a_r}
\quad\Longrightarrow\quad
\Omega(n)=a_1+\cdots+a_r=\sum_{p\mid n}v_p(n).
$$
One may also write $\Omega(n)=\sum_p v_p(n)$ over all <prime numbers>, since only finitely many <prime valuations> are nonzero. The <empty sum> gives $\Omega(1)=0$. By contrast, the <prime omega function> has $\omega(n)=r$ and counts distinct <prime factors>. https://darijgrinberg.gitlab.io/floor.pdf[Darij Grinberg, MIT 18.781, Floor and arithmetic functions, Definition 2.1.2: the two prime-factor counts]{ref}
Expanding $72=2^3\cdot3^2$ into $2\cdot2\cdot2\cdot3\cdot3$ shows $\Omega(72)=3+2=5$, whereas $\omega(72)=2$ and $\operatorname{rad}(72)=6$. The same calculation for the comparison examples gives
$$
\begin{array}{c|c|c|c|c}
n&\text{prime factorization}&\operatorname{rad}(n)&\omega(n)&\Omega(n)\\\hline
1&\text{empty product}&1&0&0\\
72&2^3\cdot3^2&6&2&5\\
30&2\cdot3\cdot5&30&3&3\\
32&2^5&2&1&5\\
36&2^2\cdot3^2&6&2&4
\end{array}
$$
The <total number of prime factors> agrees for $72$ and $32$, although their <prime supports of an integer> differ. Meanwhile $72$ and $36$ 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.
\Image[/prime-factor-multiplicity-comparison.png]
{title=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}
The <total number of prime factors> is a <completely additive arithmetic function>:
$$
\Omega(ab)=\Omega(a)+\Omega(b)\qquad(a,b\ge1).
$$
The proof is that <multiplication> adds each <prime valuation>, $v_p(ab)=v_p(a)+v_p(b)$, and summing preserves that equality. No <coprimality> condition is needed. For example, $12=2^2\cdot3$ and $18=2\cdot3^2$ both have <total number of prime factors> three; their <product> $216=2^3\cdot3^3$ has six. By comparison, the <prime omega function> is only an <additive arithmetic function>: here $\omega(216)=2\ne4=\omega(12)+\omega(18)$.
There is a useful way to see the <total number of prime factors> as a count of elementary building blocks: any expression of $n$ as a <product> of <prime numbers> has exactly $\Omega(n)$ factors, by the <fundamental theorem of arithmetic>. Equivalently, every <factorization tree> for $n>1$ has $\Omega(n)$ leaves. Repeated <prime factors> increase this count without introducing new kinds of <prime number>. The difference is the existing <excess prime-factor multiplicity>:
$$
\Omega(n)-\omega(n)=\sum_{p\mid n}\bigl(v_p(n)-1\bigr)\ge0.
$$
Every summand is nonnegative, so $\Omega(n)=\omega(n)$ if and only if $n$ is a <squarefree integer>, including $n=1$. In particular, a <prime power> $p^k$ with $k\ge1$ has $\Omega(p^k)=k$, $\omega(p^k)=1$ and $\operatorname{rad}(p^k)=p$.
Historically, Hardy and Ramanujan's 1917 paper explicitly separated the <prime omega function> from the <total number of prime factors>, writing them as $f(n)$ and $F(n)$, respectively. Their example $2^3\cdot3^2\cdot5$ has counts three and six. That distinction let them compare two measures of how an <integer> is built from <prime factors>. https://ramanujan.sirinudi.org/Volumes/published/ram35.html[G. H. Hardy and S. Ramanujan, The normal number of prime factors of a number n, Quarterly Journal of Mathematics 48 (1917), 76–92, Section 1.2, transcribed original text]{ref}
Back to article page