If a=1 or b=1 we obtain the solutions (1,2n−1) and (2n−1,1), with n>1.
Let a,b≥2 and a<b. Note that then a+b<ab+1 due to the identity (ab+1)−(a+b)=(a−1)(b−1). Let a+b=2n, n≥2; in fact then n≥3 as n=2 forces a=b=2. Then a=2n−1−c, b=2n−1+c with 1≤c<2n−1. We have
2n=a+b<ab+1=22(n−1)−c2+1≤22(n−1),
which implies ab+1=2k with n+1≤k≤2(n−1). Write
2k=22(n−1)−c2+1, i.e., ab+1=2k, in the form
(c−1)(c+1)=22(n−1)−2k. Then (c−1)(c+1) is divisible by 2k since k≤2(n−1). On the other hand n+1≤k, so (c−1)(c+1) is divisible by 2n+1. Clearly c−1 and c+1 are consecutive even numbers. Since one of them is divisible by 2 but not by 4, the other one is divisible by 2n.
Now the inequalities 1≤c<2n−1 show that the later is possible only if c−1=0, i.e., c=1. Hence a=2n−1−1, b=2n−1+1 with n≥3. This is clearly an admissible pair.
Hence the solutions are (1,2n−1), (2n−1,1) and (2n−1,2n+1), (2n+1,2n−1) with n>1.