Problem

Source: Kosovo Math Olympiad 2025, Grade 12, Problem 4

Tags: number theory, primes, GCD, functional equation, solve in natural, beautiful



Find all functions $f : \mathbb{N} \rightarrow \mathbb{N}$ for which these two conditions hold simultaneously (i) For all $m,n \in \mathbb{N}$ we have: $$ \frac{f(mn)}{\gcd(m,n)} = \frac{f(m)f(n)}{f(\gcd(m,n))};$$ (ii) For all prime numbers $p$, there exists a prime number $q$ such that $f(p^{2025})=q^{2025}$.