Sum over square divisors is multiplicative proof verification I would like someone to verify my proof of the following claim, which I have been using to solve some problems about proving series identities in Ch. 11 of Apostol's analytic number theory text. Let $f$ and $g$ be multiplicative arithmetic. Then the arithmetic function
$$h(n) = \sum_{d^2 \mid n}f(d)g(n/d^2)$$
is multiplicative.
Suppose $(m,n) = 1$. We have
\begin{equation*}
\begin{aligned}
h(m)h(n) &= \mathrel{\phantom{=}} \sum_{q^2 \mid m}f(q)g(m/q^2)\sum_{d^2 \mid n}f(d)g(n/d^2) \\
&= \sum_{q^2 \mid m, d^2 \mid n}f(q)f(d)g(m/q^2)g(n/d^2) \\
&= \sum_{q^2d^2 \mid mn}f(qd)g(mn/q^2d^2) \\
&= \sum_{d^2 \mid mn}f(d)g(mn/d^2) \\
&= h(mn),
\end{aligned}
\end{equation*}
where we use the multiplicativity of $f$ and $g$ in the third equality and in the fourth equality we use the fact that $(m,n) = 1$ implies that specifying a pair $(q^2,d^2)$ with $q^2 \mid m$ and $d^2 \mid n$ is equivalent to specifying a square divisor of $mn$.
Thanks!

Your proof is correct. An alternative way to obtain the result is to consider the function $\tilde{f}$ defined by $\tilde{f}(n) = 0$ if $n$ is not a square, and $\tilde{f}(k^2) = f(k)$. This function is multiplicative if and only if $f$ is multiplicative, and we have $h = \tilde{f} \ast g$ with the ordinary Dirichlet convolution. By multiplicativity preservation of Dirichlet convolution, the multiplicativity of $h$ follows. Another perspective on the same argument looks at the (formal) Dirichlet series
\begin{gather}
F(s) = \sum_{n = 1}^{\infty} \frac{f(n)}{n^s} = \prod_p \biggl(1 + \sum_{k = 1}^{\infty} \frac{f(p^k)}{p^{ks}}\biggr)\,, \\
G(s) = \sum_{n = 1}^{\infty} \frac{g(n)}{n^s} = \prod_p \biggl(1 + \sum_{k = 1}^{\infty} \frac{g(p^k)}{p^{ks}}\biggr)\,.
\end{gather}
Then
$$H(s) = \sum_{n = 1}^{\infty} \frac{h(n)}{n^s} = F(2s)G(s) = \prod_p \Biggl[\biggl(1 + \sum_{k = 1}^{\infty} \frac{f(p^k)}{p^{2ks}}\biggr)\biggl(1 + \sum_{k = 1}^{\infty} \frac{g(p^k)}{p^{ks}}\biggr)\Biggr]$$
has an Euler product, so $h$ is multiplicative.
