Solution:
If we expand (a+1)n+a−1 using the binomial theorem, we get:
an+⋯+2n(n−1)a2+na+1+a−1=an+⋯+2n(n−1)a2+(n+1)a.
Thus, since all the terms are divisible by a, and since (a+1)n+a−1 is a power of 2, a is also a power of 2. Let us call a=2b and (a+1)n+a−1=2c. From the condition a≥2 we obtain b≥1. Moreover, from the condition n≥2 we also obtain that 2c>a2=22b, and hence c>2b.
Observe that all the terms in (⋆), except possibly the last one, are divisible by a2=22b.
Since c>2b,2c is divisible by 22b, and hence, by difference, so is (n+1)a. Since a=2b, it follows that 2b divides n+1, that is, n+1=2b⋅m=am for some positive integer m. From the condition a≥n≥2, the only possible value for m is m=1, and hence n=a−1=2b−1. In particular, b cannot take the value 1, otherwise n=1, and hence b>1, from which a≥4 and n=a−1≥3. From this last inequality it follows that 2c>a3, and hence c>3b.
Let us rewrite (a+1)n+a−1 using the information we have gathered:
(a+1)n+a−1=an+⋯+6n(n−1)(n−2)a3+2n(n−1)a2+(n+1)a==2nb+⋯+6(2b−1)(2b−2)(2b−3)23b+2(2b−1)(2b−2)22b+22b
All the terms, except possibly the last two, are divisible by 23b; moreover 2c is also divisible by 23b, and hence so is 2(2b−1)(2b−2)22b+22b=(2b−1)(2b−1−1)22b+22b.
It follows that (2b−1)(2b−1−1)+1=22b−1−2b−2b−1+2 is divisible by 2b, but this is possible only when b=2: if b>2, in fact, all the terms of the expression except the last one are divisible by 4, and hence the sum is not divisible by 4 (and hence not by 2b either).
The only remaining case is b=2, from which a=4 and n=3. In this case, an elementary check shows that (a+1)n+a−1=128=27, so this is a solution.
In conclusion, there is a unique solution: a=4,n=3.