Problem

Source: 2020 Dutch IMO TST 2.3

Tags: number theory, relatively prime



Find all pairs $(a, b)$ of positive integers for which $a + b = \phi (a) + \phi (b) + gcd (a, b)$. Here $ \phi (n)$ is the number of numbers $k$ from $\{1, 2,. . . , n\}$ with $gcd (n, k) = 1$.