Proving that two multiplicative functions are equal

I need to prove the following statement:

"Let 'f' and 'g' be two multiplicative functions such that f(pk) = g(pk) for each prime p and k $\geqslant$ 1. Prove that f = g"

I have tried to approach this question by applying it for a particular number n with its prime factorization but couldn't figure how to even proceed.

Any help would be appreciated.

• Well, what does "multiplicative" mean to you? – lulu Feb 18 '18 at 15:42
• f(mn) = f(m)f(n) when m and n are coprime – saisanjeev Feb 18 '18 at 15:44
• Ok...so if $n=\prod p_i^{a_i}$ what is $f(n)$? What is $g(n)$? – lulu Feb 18 '18 at 15:44

Yes. Use the prime factorization of $n$ $$n=p_1^{m_1}\cdots p_k^{m_k}$$ and proceed by recurrence over $k$.
Practically, if $k=0$, you have $n=1$ and the multiplicative functions should coincide to $1$. Having supposed that, for length $k$, they coincide, suppose now $n=p_1^{m_1}\cdots p_{k+1}^{m_{k+1}}$ and set $n'=p_1^{m_1}\cdots p_k^{m_k}$ (the product of the $k$ first terms) so that the last factor ($p_{k+1}^{m_{k+1}}$) is coprime with $n'$. By hypothesis we have $f(n')=g(n')$ and then $$f(n)=f(n')f(p_{k+1}^{m_{k+1}})=g(n')g(p_{k+1}^{m_{k+1}})=g(n)\ .$$