TITLE: How many answers to $|3^x-2^y|=5$?
QUESTION [11 upvotes]: How many answers are there to the equation $|3^x-2^y|=5$ such that $x$ and $y$ are positive integers? Are there infinite? I've found $(2,2)$, $(3,5)$, and $(1,3)$. It seems to explode with larger values, but it's not a steady increase and there seems to be many dips. Do we KNOW that there are no large values for $x$ and $y$ where a power of 3 comes close to a power of 2?

REPLY [5 votes]: Here's an elementary self-contained argument that 
there is no solution with $y>5$.
A power of $3$ is congruent to either $1$ or $3 \bmod 8$, so once $y \geq 3$
we must have $3^x - 2^y = -5$.
Once $y \geq 6$, we then have $3^x \equiv -5 \bmod 2^6$, 
and thus $x \equiv 11 \bmod 16$.
But then $3^x + 5 \equiv 12 \bmod 17$, and no power of $2$ is congruent to
$12 \bmod 17$ (the powers of $2 \bmod 17$ are $2,4,8,-1,-2,-4,-8,1,2,4,8,-1$ etc.),
QED.