Let $g(n) = 5^k$ where $k$ is the number of distinct primes dividing $n$, and let $h(n) = 0$ if $n$ is divisible by $k^2$ for some integer $k > 1$, and $h(n) = 1$ otherwise.
a) Show that $g(mn) = g(m)g(n)$ does not hold in general, and determine when it holds.
b) Show that $h(mn) = h(m)h(n)$ for all positive integers $m, n$.
a) $g(mn) = 5^{k_1}$ where $k_1$ = number of distinct primes dividing $mn$. $g(m)g(n) = 5^{k_2+k_3}$. The equality $k_1 = k_2 + k_3$ fails when $m$ and $n$ share common prime factors. The property holds when $\gcd(m,n)=1$.
b) Case analysis: If $h(mn)=0$, then $mn$ is divisible by $k^2$, so at least one of $m,n$ is divisible by $k^2$, giving $h(m)h(n)=0$. If $h(mn)=1$, then $mn$ is not divisible by any $k^2$, so neither $m$ nor $n$ is divisible by any $k^2$, giving $h(m)=h(n)=1$. Hence $h(mn)=h(m)h(n)$.
Let $g(n) = 5^k$ where $k$ is the number of distinct primes dividing $n$, and let $h(n) = 0$ if $n$ is divisible by $k^2$ for some integer $k > 1$, and $h(n) = 1$ otherwise.

a) Show that $g(mn) = g(m)g(n)$ does not hold in general, and determine when it holds.

b) Show that $h(mn) = h(m)h(n)$ for all positive integers $m, n$.