# Show that $f(n) = \gcd(a,n)$ is a multiplicative function [closed]

I want to show that $f(n) = \gcd(a,n)$ where a is any natural number, is a multiplicative function.

I know I need to show that $f(mn)=f(n)*f(m)$, but I do not know how to do this.

## closed as off-topic by Stella Biderman, Cameron Williams, Daniel W. Farlow, iadvd, darij grinbergOct 21 '16 at 6:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Stella Biderman, Cameron Williams, Daniel W. Farlow, iadvd
If this question can be reworded to fit the rules in the help center, please edit the question.

• No, you need to show $f(mn) = f(n) f(m)$ when $m$ and $n$ are coprime. – Robert Israel Oct 20 '16 at 21:18
• This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level. – Stella Biderman Oct 20 '16 at 21:18
• In this context, an asterisk ($*$) (the Dirichlet's convolution) is far from a synonym of a dot ($\cdot$) (the usual product). – ajotatxe Oct 20 '16 at 22:22
• – Martin Sleziak Oct 21 '16 at 6:10
• Are you trying to show that it is multiplicative or completely multiplicative? I guess you left out the condition that $\gcd(m,n)=1$. – Martin Sleziak Oct 21 '16 at 6:11

If you prove that $$\gcd(a,x) = \prod_{p\mid a} p^{\min(\nu_p(a),\nu_p(x))}$$ where $\nu_p(x)=\max\{m\in\mathbb{N}: p^m\mid x\}$ the question becomes trivial. If $x$ and $y$ are coprime integers they have no common prime factor, so $$\gcd(a,xy) = \prod_{p\mid a}p^{\min(\nu_p(a),\nu_p(xy))}=\prod_{p\mid x\,\wedge\, p|a}p^{\min(\nu_p(a),\nu_p(xy))}\prod_{p\mid y\,\wedge\, p|a}p^{\min(\nu_p(a),\nu_p(xy))}$$ and the RHS equals $$\prod_{p\mid x\,\wedge\, p|a}p^{\min(\nu_p(a),\nu_p(x))}\prod_{p\mid y\,\wedge\, p|a}p^{\min(\nu_p(a),\nu_p(y))}=\gcd(a,x)\gcd(a,y).$$