Problem

Source: 2018 Pan-African Shortlist - A5

Tags: number theory, algebra, function, functional equation, multiplicative function



Let $g : \mathbb{N} \to \mathbb{N}$ be a function satisfying: $g(xy) = g(x)g(y)$ for all $x, y \in \mathbb{N}$, $g(g(x)) = x$ for all $x \in \mathbb{N}$, and $g(x) \neq x$ for $2 \leq x \leq 2018$. Find the minimum possible value of $g(2)$.