<s>[INST] When is $2^m3^n +1$ the square of some integer? 
Find all pairs of natural numbers $(m, n)$ for which $2^m3^n +1$ is the square of some integer.

The powers of $2$ modulo $10$ cycle as $2,4,8,6,\ldots$ and the powers of $3$ as $3,9,7,1,\ldots$. The square of am integer needs to end in $0,1,4,5,6,$ or $9$. Thus, $2^m3^n$ ends in $4$ or $8$. Therefore, if $m \equiv 1 \pmod{4}$, then $n \equiv 2 \pmod{4}$; if $m \equiv 2 \pmod{4}$ then $n \equiv 3,0 \pmod{4}$; if $m \equiv 3 \pmod{4}$, then $n \equiv 1,0 \pmod{4}$; if $m \equiv 0 \pmod{4}$, then $n \equiv 1,2 \pmod{4}$. Do I preform casework from here or is there an easier way?
 [/INST] $2^m3^n+1=k^2$ for some $k\in\mathbb Z^+$ is true if and only if $2^m3^n=(k+1)(k-1)$.
Natural numbers may or may not include $0$ (see Wikipedia or MathWorld). I'll assume $0\in\mathbb N$.
By Euclidean algorithm: $$\gcd(k+1,k-1)$$
$$=\gcd((k+1)-(k-1),k-1)$$
$$=\gcd(2,k-1)$$
$$=\gcd(2,k+1)$$
If $m=0$, then $\gcd(k+1,k-1)=1$, so, since also $k+1>k-1$, we get $k+1=3^n$ and $k-1=1$, so $k=2$, $n=1$. We get the solution $(m,n)=(0,1)$.
If $m\ge 1$, then $2\mid (k+1)(k-1)$, so by Euclid's Lemma either $2\mid k+1$ or $2\mid k-1$, i.e. either $\gcd(2,k+1)=2$ or $\gcd(2,k-1)=2$. In any case, $\gcd(k+1,k-1)=2$, so $$2^{m-2}3^n=\left(\frac{k+1}{2}\right)\left(\frac{k-1}{2}\right),$$
where $\gcd\left(\frac{k+1}{2},\frac{k-1}{2}\right)=1$, so there are two cases:
$1)\ \ \ $ $\frac{k+1}{2}=2^{m-2}$ and $\frac{k-1}{2}=3^n$. Then $2^{m-2}=3^n+1>1$, so $m-2\ge 1$. If $n=0$, then $(m,n)=(3,0)$. Let $n\ge 1$. Then $(-1)^{m-2}\equiv 1\pmod{3}$, so $m-2=2t$ for some $t\in\mathbb Z^+$, so $$\left(2^t+1\right)\left(2^t-1\right)=3^n$$ $$\gcd\left(2^t+1,2^t-1\right)=\gcd\left(2,2^t-1\right)=1,$$
also $2^t+1>2^t-1$, so $2^t+1=3^n$ and $2^t-1=1$, so $t=1$, $n=1$, so $m=4$. We get the solution $(m,n)=(4,1)$.
$2)\ \ \ $ $\frac{k+1}{2}=3^n$, $\frac{k-1}{2}=2^{m-2}$. Then $3^n=2^{m-2}+1>1$, so $n\ge 1$, so $m-2\ge 1$. If $m-2=1$, we get $(m,n)=(3,1)$. If $m-2\ge 2$, we get $(-1)^{n}\equiv 1\pmod{4}$, so $n=2h$ for some $h\in\mathbb Z^+$, so
$$\left(3^h+1\right)\left(3^h-1\right)=2^{m-2}$$
$$\gcd\left(3^h+1,3^h-1\right)=\gcd\left(2,3^h-1\right)=2$$
Therefore, since $3^h+1>3^h-1$ and $m\ge 4$, we get $3^h+1=2^{m-3}$ and $3^h-1=2$, so $h=1$, $m=5$, so $n=2$, so $(m,n)=(5,2)$.
Answer: $(m,n)=(0,1),(3,0),(4,1),(3,1),(5,2)$.
</s>