$3\times 2^m + 4 = n^2$ I have been trying to solve this problem but I couldn't find any way to find the answers. Find all natural numbers m and n such that:
$3\times\ 2^m + 4 = n^2$
This is a question from the Moroccan Maths Olympiad (2019.)
I tried bringing $4$ to the other side and factorising to get: $3\times 2^m=(n+2)(n−2),$ and I tried solving for that $n+2$ is a multiple of three then $n-2$ is a multiple of three but I couldn't find anything.
Can anyone help me please?
 A: Either $$n+2=3\cdot 2^i,n-2=2^j$$ or $$n+2=2^i, n-2=3\cdot 2^j$$ for some $i,j\geq 0.$
So you want to solve:
$$4=3\cdot 2^i-2^j\tag 1$$
and:
$$4=2^i-3\cdot 2^j.\tag2$$
I’ll partially solve $(1)$ for you.
If $3\cdot 2^i-2^j>0,$ then $j\leq i+1.$
Then $$4=3\cdot 2^i-2^j\geq 3\cdot 2^i-2^{i+1}=2^i.$$
So $i\leq 2.$ This let’s you just check individual cases.
A similar argument works for $(2).$ Find a bound on $j$ in terms of $i,$ find the minimum possible value for the difference, and get an upper bound on $i.$
You should get three answers, total.
A: Assume that $m, n \in \mathbb{N}$. From the equation, you can deduce that $$2 \mid n^2 \implies 2 \mid n\implies n = 2k \implies 3\cdot 2^m + 4 = 4k^2\quad(1)$$ Observe that $m = 1$ yields no integer solution, and $m = 2 \implies k = 2 \implies n = 4$.Thus consider $m \ge 3$, divide both sides of $(1)$  by $4$, you have: $3\cdot 2^{m-2}+1=k^2\implies k$ is odd $$\implies k = 2q+1\implies 3\cdot2^{m-2}+1=(2q+1)^2 \implies 3\cdot2^{m-2} = 4q(q+1)\quad(2)$$ Observe also that $m = 3,4$ yields no integer solution in $q$. So $m \ge 5$, and $(2)$ gives $$3\cdot 2^{m-4} = q(q+1)$$ $$\implies q =2, q+1 = 3 \implies q =2^{m-4}$$ $$\implies q =3, q+1 = 4 =2^{m-4}$$ $$\implies m =5\implies k = 5\implies n = 10 \implies (m,n) = (5,10)$$ $$\implies m =6\implies k = 7\implies n = 14 \implies (m,n) = (6,14)$$ are the remaining solutions. So altogether, the solutions are: $(2,4), (5,10), (6,14)$ are the $3$ solutions and they are the only solutions to the equation.
A: $$3\cdot2^{m} + 4 = n^2$$
We take the three cases $m=3a, m=3a+1,$ and $m=3a+2.$
The problem can be reduced to finding the integer points on elliptic curves as follows.
$\bullet m=3a$
Let $X = 3\cdot2^a, Y=3n$, then we get  $Y^2 =X^3 + 36.$
According to LMFDB, this elliptic curve has $(X,Y)=(-3,\pm 3)$, $(0,\pm 6)$, $(4,\pm 10)$, $(12,\pm 42).$
Hence $(X,Y)= (12, 42)  \implies (m,n)=(6,14).$
$\bullet m=3a+1$
Let $X = 6\cdot2^a, Y=6n$, then we get $Y^2 =X^3 + 144.$
This elliptic curve has $(X,Y)=(0,12)$, then there is no natural solution $(m,n).$
$\bullet m=3a+2$
Let $X = 12\cdot2^a, Y=12n$, then we get    $Y^2 =X^3 + 576.$
This elliptic curve has $(X,Y)=(-8 , 8 ), (0 , 24 ), (12 , 48 ), (24 , 120 ), (160 , 2024 ).$
Hence $(X,Y)= (12 , 48)  \implies (m,n)=(2,4).$
$(X,Y)= (24 , 120)  \implies (m,n)=(5,10).$
Thus, there are only natual solutions $(m,n)=(2,4),(5,10),(6,14).$
