Problem

Source: Rioplatense Math Olympiad Level 3, P5 2024

Tags: algebra, functional equation, fe, rioplatense



Let $S = \{2, 3, 4, \dots\}$ be the set of positive integers greater than 1. Find all functions $f : S \to S$ that satisfy \[ \text{gcd}(a, f(b)) \cdot \text{lcm}(f(a), b) = f(ab) \]for all pairs of integers $a, b \in S$. Clarification: $\text{gcd}(a,b)$ is the greatest common divisor of $a$ and $b$, and $\text{lcm}(a,b)$ is the least common multiple of $a$ and $b$.