A nice way to solve this is to factor:
[tex]3\times 2^m = (n-1)(n+1)[/tex]
Now clearly one factor on the right is a power of 2 since the factor 3 can only occur in one of them. Split it into cases depending on which it is and you should get the answers.