Find all functions $f: \mathbb{N} \to \mathbb{N}$ such that $$\gcd(f(x),y)f(xy)=f(x)f(y)$$for all positive integers $x, y$.
Problem
Source: Nordic MC 2023 P2
Tags: number theory, greatest common divisor
21.04.2023 18:57
21.04.2023 20:34
but $f(x)=\mathrm{rad}(x)$ works... (and even more)
22.04.2023 09:23
Swap $x,y$ to get $\gcd(f(x),y)=\gcd(f(y),x)$, and so for $y=f(x)$ we obtain that $f(x)=\gcd(f(f(x)),x)$. Hence, this implies that $f(x) \mid x$ for all $x$. Therefore, $f(p) \mid p$ for all primes $p$, i.e. $f(p) \in \{1, p \}$ for all primes $p$. Let $A=\{p \,\, {\rm prime} : f(p)=1 \}$ and $B=\{p \,\, {\rm prime}: f(p)=p \}$. Note that $A$ or $B$ can be empty, and that $p \in A$ or $p \in B$ for all primes $p$. We have the following Claims. Claim 1: $f(x)=f({\rm rad} \, x)$ for all $x$. Proof: We firstly claim that $f(px)=f(x)$ for all primes $p$ and all $x$ such that $p \mid x$. Indeed, let $p$ be a prime and $x$ be such that $p \mid x$. Then, we have two cases to consider: Case 1: $p \in A$. Then, $f(p)=1$ and so if we take $x=p$ in the initial equation we obtain that $f(py)=f(y)$ for all $y$, from which the desired relation follows. Case 2: $p \in B$. Then, $f(p)=0$ and so if we take $x=p$ in the initial equation we obtain that $\gcd(p,y)f(py)=pf(y)$ for all $y$, hence $f(py)=f(y)$ for all $p \mid y$, as desired. Thus, in all cases we have obtained that $f(px)=f(x)$ if $p \mid x$, from where it readily follows that $f(x)=f({\rm rad} \, x)$ $\blacksquare$ From now on, it's obvious that we can restrict to squarefree inputs. Claim 2: If $x$ is squarefree, then $f(x)$ is squarefree, too. Proof: Let $x=p_1 \ldots p_\ell,$ with the $p_i$ being distinct primes. Then, if $q^2 \mid f(x)$ for some prime $q$, we have two cases to consider: Case 1: $q=p_i$ for some $i$. WLOG $q=p_1$, and so if we take $x=p_1 \ldots p_\ell$ and $y=p_1$ and $y=p_1^2$ successively in the initial equation, we obtain $\gcd(f(p_1 \ldots p_\ell),p_1)f(p_1^2p_2 \ldots p_\ell)=f(p_1 \ldots p_\ell)f(p_1)=f(p_1 \ldots p_\ell)f(p_1^2)=$ $=f(p_1^3 p_2 \ldots p_\ell)\gcd(f(p_1 \ldots p_\ell),p_1^2)=f(p_1 \ldots p_\ell)\gcd(f(p_1 \ldots p_\ell),p_1^2),$ therefore we conclude that $\gcd(f(p_1 \ldots p_\ell),p_1)=\gcd(f(p_1 \ldots p_\ell),p_1^2)$. Thus, if $p_1^2 \mid f(p_1 \ldots p_\ell)$, we have that $p_1=\gcd(f(p_1 \ldots p_\ell),p_1)=\gcd(f(p_1 \ldots p_\ell),p_1^2)=p_1^2,$ a contradiction. Case 2: $q \neq p_i$ for all $i$. If we take $x=p_1 \ldots p_\ell$ and $y=q$ and $y=q^2$ successively in the initial equation, we obtain $\gcd(f(p_1 \ldots p_\ell),q)f(p_1^2p_2 \ldots p_\ell q)=f(p_1 \ldots p_\ell)f(q)=f(p_1 \ldots p_\ell)f(q^2)=$ $=f(p_1 p_2 \ldots p_\ell q^2)\gcd(f(p_1 \ldots p_\ell),q^2)=f(p_1 \ldots p_\ell q)\gcd(f(p_1 \ldots p_\ell),q^2),$ therefore we conclude that $\gcd(f(p_1 \ldots p_\ell),q)=\gcd(f(p_1 \ldots p_\ell),q^2)$. Thus, if $q^2 \mid f(p_1 \ldots p_\ell)$, we have that $q=\gcd(f(p_1 \ldots p_\ell),q)=\gcd(f(p_1 \ldots p_\ell),q^2)=q^2,$ a contradiction $\blacksquare$ Claim 3: If $x=p_1 \ldots p_\ell$, then a prime $q$ divides $f(x)$ if and only if $q=p_i$ for some $i$, and $q \in B$. Proof: Note that $f(x) \mid x$ for all $x$, and so if $q \mid f(x)$, we must have $q \mid x$ too, hence $q=p_i$ for some $i$. Now, for any $i$, take $x=p_1 \ldots p_\ell$ and $y=p_i$ in the initial equation to obtain that $\gcd(f(p_1 \ldots p_\ell),p_i)f(p_i \cdot p_1p_2 \ldots p_\ell)=f(p_1 \ldots p_\ell)f(p_i),$ hence $\gcd(f(p_1 \ldots p_\ell),p_i)=f(p_i)$. Now, if $p_i \in B$, then $f(p_i)=p_i$ and so $p_i \mid f(p_1 \ldots p_\ell)$. Conversely, if $p_i \mid f(p_1 \ldots p_\ell)$, then $f(p_i)=\gcd(f(p_1 \ldots p_\ell),p_i)=p_i,$ that is $p_i \in B$, as desired $\blacksquare$ To the problem, combining our three Claims we infer the following characterization of $f$: For any $x$, let ${\rm rad} \, x=\prod_{p \in A} p \cdot \prod_{q \in B} q$. Then, $f(x)=\prod_{q \in B} q$. It's easy to check that this function indeed works, for any choice of sets $A,B$ such that they are disjoing and their union is the set of all primes.
22.04.2023 09:58
a_507_bc wrote: Find all functions $f: \mathbb{N} \to \mathbb{N}$ such that $$P(x,y): \quad \gcd(f(x),y)f(xy)=f(x)f(y)$$for all positive integers $x, y$. Define $E$ as the set of functions $g: \mathbb{Z}_{\geq 0} \rightarrow \mathbb{Z}_{\geq 0}$ s.t. $$Q(a,b): \quad g(a)+g(b)=g(a+b)+\min(g(a),b)$$ Lemma: $E=\{0, \mathrm{1}_{n > 0}\} $ where $$\mathrm{ 1 }_{n > 0}= \left\{ \begin{array}{ll} 0 & \mbox{if } n = 0 \\ 1 & \mbox{if } n \geq 1 \end{array}
Claim 1: $\gcd(f(a),b)=\gcd(a,f(b))$ for all $a,b \in\mathbb{N}$
Claim 2: $\forall a \in \mathbb{N}$ and for any prime $p$: $p \mid f(a)$ $\implies$ $p \mid a$
Claim 3: $f$ is multiplicative
Claim 4: Let $p$ be a prime, there exists a function $g_p \in \{0, \mathrm{1}_{n > 0}\} $ s.t. $f(p^e)=p^{g_p(e)}$.
Easy to check that if we are give a collection of functions $(g_p)_p$ ($p$ runs over primes) where $g_p \in \{0, \mathrm{1}_{n > 0}\}$, and set $f(n)=\prod_{p \mid n}p^{g_p(v_p(n))}$, then $f$ satisfies $P$.
22.04.2023 16:17
Solved with GoodMorning. The only solutions are $f(n) = \prod_{p\in S, p\mid n} p$, where $S$ is a set of primes. These can be checked to work. Now we show they are the only solutions. Let $P(x,y)$ denote the given assertion. Comparing $P(x,y)$ and $P(y,x)$ gives \[\gcd(f(x),y) = \gcd(f(y),x)\]Setting $y = f(x)$ here gives $\gcd(f(f(x)), x) = f(x)$, so $f(x)\mid x$. Additionally this implies $f(p) \in \{1,p\}$ for all primes $p$. Let $S$ denote the set of primes $p$ such that $f(p) = p$. If $p\in S$, then $\gcd(x,p) = \gcd(f(x), p)$, so if $p\mid x\iff p\mid f(x)$. $P(p,x): \gcd(p,x) f(xp) = pf(x)$. Thus, $f(xp) = pf(x)$ if $p\nmid x$, and $f(xp) = f(x)$ if $p\mid x$. If $p\not\in S$ and $p$ is a prime, then $\gcd(f(x), p) = 1$, so $p\nmid f(x)$ for all $x$. $P(p,x): f(xp) = f(x)$. Fix a positive integer $n$, and let $p_1, p_2, \ldots, p_k$ be the prime divisors of $n$ in $S$, and $q_1, q_2, \ldots, q_l$ be the other prime divisors of $n$, such that $n = \prod_{i=1}^k p_i^{a_i} \prod_{i=1}^l q_i ^{b_i}$, where all the $a_i$ and $b_i$ are positive. Due to the fact that $f(xq) = f(x)$ for all primes $q\not\in S$, we deduce that $f(q^t x) = f(x)$ also. Additionally, $f(xp\cdot p ) = f(xp)$ for all $p\in S$, so we have $f(xp^t) = f(xp)$ for any positive integer $t$. This implies that $f(n) = f\left(\prod_{i=1}^k p_i\right)$. Using the fact that $f(x\cdot p) = pf(x)$ if $p\in S$ and $p\nmid x$, we find that $f\left(\prod_{i=1}^k p_i\right) = \prod_{i=1}^k p_i$. Therefore $f(n) = \prod_{i=1}^k p_i = \prod_{p\in S, p\mid n} p$, as desired.
22.04.2023 17:41
By swapping $x,y$ we get $(f(x),y)=(x,f(y))$ which gives $f(p^n)|p^n$ for $(x,y)=(p^n,f(p^n))$. Note that $f(p) \in \{1,p\}$. $P(p,p^m)$ gives $f(p^{m+1})=f(p^m)$. Thus for any prime $f(p^n)=f(p)$. By induction on $\mathrm{rad}(n)$, I will prove that $f(n)=\prod_{p|n} f(p)$. For $\mathrm{rad}(n)=1$ we proved it. Let $m=p^kn$ where $(p^k,n)=1$. $P(p^k,n) \implies f(p^kn)=f(p)f(n)$. Thus if it is true for $\mathrm{rad}(n)$, it is also true for $\mathrm{rad}(n)+1$ Thus the function is $f(n)=\prod_{p|n} f(p)$ where $f(p) \in \{1,p\}$.
30.04.2023 03:37
Swapping $x,y$, we get the equation $\gcd(f(x),y)=\gcd(f(y),x)$. From here we get the general solution. If $f(p)=p$ then $P(p,p)$ in the original gives $f(p^2)=p$, so all $a_i\in \{0,1\}$. This gives the desired solution set.