Starting with Charlie's equation,
m = (n^2 + 1) / (n - 1)
Complete the square to get
m= ((n^2-2n+1) + 2n)/(n-1)
= (n-1) + 2n/(n-1)
n-1 is relatively prime to n,
so the only way the right hand side is integral is if
(n-1) = 1 or (n-1) = 2
So the only solutions are n = 2 or 3. In both cases, m = 5.