Explain why the following is or isn't a multiplicative function.

A multiplicative function satisfies $f(1)=1$ (true in your case) and $f(ab)=f(a)f(b)$ for any coprime $a,b$. This is easily verified, by writing $a=2^mx$ for $x$ odd, $b=2^ny$ for $y$ odd, and noting that $f(a)=2^m,f(b)=2^n$ and $f(ab)=2^{m+n}$ which is good.

In fact, $f$ is what is known as totally (or completely) multiplicative because the relation is satisfied for all pairs $a,b$, not just coprime ones.


I would start by noting that you can write any positive integer $n$ as $n = a \cdot 2^k$ where $a$ is odd, and $f(n) = 2^k$. Based on that, consider what happens if you have $n_1 = a_1 \cdot 2^{k_1}$ and $n_2 = a_2 \cdot 2^{k_2}$.


Suppose $a = 2^\alpha p$ where $p$ is an odd prime, and $b = 2^\beta q$, where $q$ is also an odd prime (it may even be the same as $p$, actually). Thus $f(a) = 2^\alpha$ and $f(b) = 2^\beta$. Then what is $ab$? Obviously $ab = 2^\alpha 2^\beta pq = 2^{\alpha + \beta} pq$, so $f(ab) = 2^{\alpha + \beta}$. Now you only need to consider $p$ and $q$ that may not be prime but are odd to complete the proof.