Prove that $23$ does not divide $2^n + 3^m$, for any $m, n \in \mathbb{N}$ Prove that $23$ does not divide $2^n + 3^m$, for any $m, n \in \mathbb{N}$.
I've tried to prove that the equation $2^n + 3^m = 0$ has no solutions in $\mathbb{Z}_{23}$, but didn't succed.
Thank you!
 A: The residues $\mod23$ of the sequences $(2^n)_n$ and $(3^n)_n$ are, respectively,
$$
D=\{2^n\mod23:n\in\mathbb{N}\}=\{1,2,4,8,16,9,18,13,3,6,12\}
$$
$$
T=\{3^m\mod23:m\in\mathbb{N}\}=\{1,3,9,4,12,13,16,2,6,18,8\}.
$$
You need to show that $\{23\}\not\in D+T$, which can be easily accomplished by observing that whenever $a$ is in $D$, $23-a$ is not in $T$.
A: Hint:  Render $2\equiv 5^2$, $3\equiv 7^2$ mod $23$.  Can a sum of nonzero squares have zero residue mod $23$ when $23$ is a $4k+3$ prime?
Another approach, if the above is "slightly overlevel" as in the comments:
If $2^n+3^m$ were divisible by $23$ then so is $8^n+27^m$ as $a+b$ divides $a^3+b^3$.  Then $8^n+4^m=2^{3n}+2^{2m}$ would also be a multiple of $23$.  Through division by the smaller power of $2$ in $\{8^n,4^m\}$ we find that $2^k+1$ should be a multiple of $23$ for some whole number $k(=|3n-2m|)$.  Now try to find a value of $k$ that makes $2^k\equiv-1\bmod 23$.
A: There are only 11 modului that $2^n$ and $3^n$ can be, and the other remaining 11 modulii are the 11 numbers required to add be added to give 23.
The fact that 23 is 3, mod 4, but is -1, mod 24, means that if $2^m+3^n$ gives a value, mod 23, then the negative is not in that this form,
The same applies to any prime that gives 23 mod 24, such as 47, 71, 167, ...
