First, let a=1. It holds that φ(1)=1. For all positive integers b, we have ggd(a,b)=1, so the equation becomes 1+b=1+φ(b)+1, thus φ(b)=b−1. Therefore, there is exactly one number in {1,2,…,b} that is not coprime with b; this must be b itself (since ggd(b,b)>1 unless b=1, but in that case φ(b)=b). This implies that b is a prime number. The equation holds for all prime numbers. We conclude that (1,p) is a solution for all prime numbers p. Similarly, b=1 gives the solutions (p,1).
Now, we assume that a,b≥2. Since ggd(b,b)>1, it follows that φ(b)≤b−1. Therefore,
ggd(a,b)=a+b−φ(a)−φ(b)≥a−φ(a)+1
Let p be the smallest prime divisor of a (which exists, since a≥2). Since for all multiples of p, tp≤a, we have ggd(tp,a)>1, it follows that a−φ(a)≥p1⋅a. Therefore,
ggd(a,b)≥a−φ(a)+1≥pa+1
The largest two divisors of a are a and pa. Since ggd(a,b) is a divisor of a that is at least pa+1, it must be equal to a. Thus, ggd(a,b)=a. By a completely analogous argument, we can prove that ggd(a,b)=b. Therefore, a=b.
Now the equation becomes 2a=2φ(a)+a, or a=2φ(a). We see that 2∣a. Therefore, write a=2k⋅m with k≥1 and m odd. Then, by a known property of the φ-function, we have φ(a)=φ(2k)φ(m)=2k−1⋅φ(m), so the equation becomes 2k⋅m=2⋅2k−1⋅φ(m), or m=φ(m). This implies m=1. Therefore, a=b=2k, and the equation indeed holds.
We conclude that the solutions are: (1,p) and (p,1) for all prime numbers p, and (2k,2k) for all positive integers k.