<s>[INST] Prove that $\sigma(n^2)=\sum_{d\mid n} 2^{\omega(d)}$ Let $\omega(n)$ denote the number of distinct prime divisors of $n>1$, with $\omega(1)=0$. 
(a) Show that $2^{\omega(n)}$ is a multiplicative function. 
(b) Prove that $$\sigma(n^2)=\sum_{d\mid n} 2^{\omega(d)}.$$
I have done the part (a) and I am stuck by (b). 
First, I set $d=p_1^{e_1}\cdots p_k^{e_{k}}$ be a factor of $n$. Then I don't know what's the next step.
 [/INST] Suppose we seek to show that
$$\tau(n^2) =
\sum_{d|n} 2^{\omega(d)}.$$
This can be done using Dirichlet series and Euler products.
We have for the RHS and 
$$\sum_{n\ge 1} \frac{1}{n^s} 2^{\omega(n)}$$ 
the Euler product
$$\prod_p 
\left(1 + \frac{2}{p^s} + \frac{2}{p^{2s}} + \frac{2}{p^{3s}}
+\cdots\right).$$
which is
$$\prod_p \left(-1 + 2\frac{1}{1-1/p^s}\right)
= \prod_p \frac{-1+1/p^s+2}{1-1/p^s}
\\ = \prod_p \frac{1+1/p^s}{1-1/p^s}
= \prod_p \frac{1-1/p^{2s}}{(1-1/p^s)^2}
= \frac{\zeta(s)^2}{\zeta(2s)}.$$
Therefore 
$$\sum_{n\ge 1} \frac{1}{n^s} \sum_{d|n} 2^{\omega(d)}
= \frac{\zeta(s)^3}{\zeta(2s)}.$$ 
On the other hand we have
$$\sum_{n\ge 1} \frac{1}{n^s} \tau(n^2)
\\= \prod_p 
\left(1 + (2+1) \frac{1}{p^s}
+ (4+1) \frac{1}{p^{2s}}
+ (6+1) \frac{1}{p^{3s}}
+ (8+1) \frac{1}{p^{4s}}
+ \cdots\right).$$
This is
$$\prod_p \left(1+\frac{1/p^s}{1-1/p^s}
+ \sum_{k\ge 1} \frac{2k}{p^{ks}}
\right)
\\ = \prod_p \left(1+\frac{1/p^s}{1-1/p^s}
+ 2 \frac{1/p^s}{(1-1/p^s)^2}
\right).$$
To aid in simplification we put $z=1/p^s$ to get
for the inner term
$$1 + \frac{z}{1-z}
+ \frac{2z}{(1-z)^2}$$
This simplifies to
$$\frac{1+z}{(1-z)^2}.$$
On the other hand
$$\frac{\zeta(s)^3}{\zeta(2s)}
= \prod_p \frac{1-z^2}{(1-z)^3}
= \prod_p \frac{1+z}{(1-z)^2}.$$
We have equality, QED.
</s>