How can we check whether a number can be represented in the form of $a^x - b^x$, where $a$ and $b$ are integers of opposite parity and $x$ is positive and even integer.
I thougth of using $$a^n - b^n = (a - b) (a^{n-1} + a^{n-2}b + \cdots + b^{n-2}a +b^{n-1}) .$$