Lately I've been thinking about the functional equation $$f(ab) = f(a) + f(b)$$ but not in the usual sense where continuity or differentiability are assumed. It's clear that $f(1) = 0$, by letting $a = b = 1$. It is also clear, that given any natural number $n = p_1^{a_1}p_2^{a_2}\cdots p_m^{a_m}$ that $f(n) = a_1f(p_1) + a_2f(p_2) + ... + a_mf(p_m)$.
Consider the function $\ell:\mathbb N\setminus\{0\}\to\mathbb N$ such that it is a solution to the functional equation, and $\ell(p) = p$ when $p$ is prime.
Some example values: $$\ell(1) = 0\\\ell(2) = 2\\\ell(15) = \ell(5) + \ell(3) = 8\\\ell(264) = 3\ell(2) + \ell(3) + \ell(11) = 20$$
Here is a plot of the function for $1 \leq n \leq 1000$:

So my question is, does this function have a name? Does it have any useful purpose, or interesting properties? It seems we can extend the domain of this function to the positive rational numbers, making the range $\mathbb Z$ rather than $\mathbb N$. Some values if we extend to rational numbers:
$$\ell\left(\frac12\right) = -2\\\ell\left(\frac{7}{9}\right) = \ell(7) - 2\ell(3) = 1 \\\ell\left(\frac{42}{110}\right) = \ell(2) + \ell(3) + \ell(7) - \ell(11)-\ell(5) - \ell(2) = -6$$
Notice how the common factors cancelled out in the last example without having to simplify the fraction, showing that $\ell$ is well defined for all $n \in \mathbb Q^+\setminus\{0\}$.
* I made the graph quickly on excel, please feel free to replace it with a better one.
The function $\ell$ on $\Bbb N$ is the sum of prime factors (function), or a little less literally, the integer logarithm.
P.A. MacMahon calls $ell(n)$ the potency of $n$ (see P.A. MacMahon, Properties of Prime Numbers Deduced from the Calculus of Symmetric Functions, Proc. London Math. Soc. (1925) s2-23 (1): 290-316.)
The values $\ell(1), \ell(2), \ldots$ are the content of OEIS A001414, and this sequence has its own OEIS Wiki page.
Note that the extended map on $\Bbb Q_+$ is a group homomorphism $(\Bbb Q_+, \,\cdot\,) \to (\Bbb Z, +)$.