Analytically it is not possible to see that these are the only 2 integer solutions. But you can find out that these are the ONLY possible solutions. For this, TRY GRAPHING
The best way to see that these are the only solutions is to look at the graph of these two functions:
f(k) = kˆ2 is a parabola with vertex on (0,0)
g(k) = 2ˆk is a exponential curve that has (0,1) as its y intersect
If you trace both graphs you'll see that the tail of the exponential curve does in fact cross the parabola for a value of k < 0 . However you can easily cross out the possibility of this being an integer value of k by testing out k = -1 and k = -2. (ps: Just for curiosity ,this value is a non rational value, aprox. -0.76)
For positive values, there are two intersections (that happen to be integers!). They are, in fact, the trivial k=2 and k=4 solutions most people guessed by testing numbers. It is not hard to see that the first intersection will have to happen, and given how the rate of increase for the exponential curve picks up much faster than the rate of increase for the quadratic function, they will have to cross paths once more. After that, the rate of increase for the quadratic does not catch up to the exponential, making it impossible for a third positive intersection.
Hope it helped!
Please press "kudo" if this helped you!