Problem

Source: BMO SL 2023 N2

Tags: number theory



Find all positive integers, such that there exist positive integers $a, b, c$, satisfying $\gcd(a, b, c)=1$ and $n=\gcd(ab+c, ac-b)=a+b+c$.