Official Solution:If \(2^x + 2^y = x^2 + y^2\), where \(x\) and \(y\) are nonnegative integers, what is the greatest possible value of \(|x - y|\)?A. 0
B. 1
C. 2
D. 3
E. 4
We can rearrange the equation, putting all the \(x\)’s on one side and all the \(y\)’s on the other side:
\(2^x - x^2 = y^2 - 2^y\)
Now, list the values of \(2^n\) and \(n^2\) for the first several nonnegative integers \(n\). In fact, go ahead and compute the differences both ways (both \(2^n - n^2\) and \(n^2 - 2^n\)).
\(n\) \(2^n\) \(n^2\) \(2^n - n^2\) \(n^2 - 2^n\) 0 1 0 1 -1 1 2 1 1 -1 2 4 4 0 0 3 8 9 -1 1 4 16 16 0 0 5 32 25 7 -7 6 64 36 28 -28
From this point on, \(2^n\) grows much faster than \(n^2\), so the differences explode. This means that in order to have a valid equation \((2^x - x^2 = y^2 - 2^y)\), we will have to use small values of the integers. We want values in the \(2^n - n^2\) column to match values in the \(n^2 - 2^n\) column, and to maximize the value of \(|x - y|\), we want to pick values from different rows - as far apart as possible.
If we pick \(x = 0\) and \(y = 3\) (or vice versa), then we get a valid equation:
\(2^0 - 0^2 = 3^2 - 2^3\)
\(1 - 0 = 9 - 8\)
These values of \(x\) and \(y\) are as far apart as possible, so we get \(|x - y| = 3\).
Answer: D