Find the sum of all positive integers for which is a perfect square whenever and are integers such that .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If n = 1 then the expression is always zero. If n = 4 the expression simplifies to ( x 2 + x y + y 2 ) 2 .
Now let x = − 1 , y = − 1 , z = 2 . The expression becomes 2 n − 1 + ( − 1 ) n . Clearly this is not a square for n = 2 , 3 , so we can restrict our attention to n ≥ 5 .
If n is odd then we get a 2 − 1 = b 2 where a = 2 ( n − 1 ) / 2 and b is a positive integer, so ( a − b ) ( a + b ) = 1 which is clearly impossible for positive integers a , b .
If n is even then we get 2 n − 1 + 1 = b 2 for some positive integer b , so ( b − 1 ) ( b + 1 ) = 2 n − 1 . So both b − 1 and b + 1 are powers of 2 , but their gcd is at most 2 , so one of them is ≤ 2 . So b ≤ 3 . But this is impossible for n ≥ 5 .
So there are no other admissible values of n , so the answer is 1 + 4 = 5 .