TITLE: Differences of pairs of powers of integers
QUESTION [6 upvotes]: I'm interested in equations of the form $n = x^a - y^b$, with integers $x, a, y, b, n$, and $a,b > 1$, for different values of $n$. For example:
$1 = 3^2 - 2^3$
$2 = 3^3 - 5^2$
$3 = 2^7 - 5^3$
$4 = 2^3 - 2^2$
$5 = 3^2 - 2^2$  
So far, my rather primitive Python program has not found any such equation for $n = 6$. It seems likely that for any given integer, there are two powers of integers out there that differ by that integer. Has this been proven to be true or false?

REPLY [4 votes]: Pillai's Diophantine equation is given by
$$
n=a^x-b^y
$$
for integers $a,b,x,y,n$. This is a classical topic with many results and several conjectures. A. Herschfeld showed that
if $n$  is an integer with sufficiently large $|n|$, then the equation
$$
2^x − 3^y = n
$$
has at most one solution $(x, y)$ in positive integers $x$ and $y$. For $|n|\le 10$ he showed that only for $n=-1,1,-5,5,-7,7$ there is a solution.