## Task A-3.1.

Determine all natural numbers $m$ and $n$ for which $6^{m}+2^{n}+2$ is a perfect square.
## Solution.

The number $6^{m}+2^{n}+2=2\left(3^{m} \cdot 2^{m-1}+2^{n-1}+1\right)$ is even. For it to be a perfect square, the expression inside the parentheses must be even, meaning exactly one of the numbers $2^{m-1}, 2^{n-1}$ must be odd. This implies that one of the numbers $m$ and $n$ must be 1, and the other must be greater than 1.

First case. $\quad m=1$.

We seek natural numbers $n$ for which $6^{1}+2^{n}+2=2^{n}+8$ is a perfect square.

Since $2^{n}+8=4\left(2^{n-2}+2\right)$, we conclude that $2^{n-2}+2$ must also be a perfect square.

If $n \geq 4$, then $2^{n-2}+2$ is an even number that is not divisible by 4, so it cannot be a perfect square.

The remaining cases to check are $n=2,3$. Only for $n=3$ is the number a perfect square.

Second case. $\quad n=1$.

Since the number $6^{m}+2^{1}+2 \equiv(-1)^{m}+4(\bmod 7)$ gives a remainder of 3 or 5 when divided by 7, it cannot be a perfect square, as a perfect square when divided by 7 gives a remainder of $0,1,2$ or 4.

Thus, the only solution is $(m, n)=(1,3)$.

Second method. The second case can also be solved by considering remainders modulo 4:

Assume there exists $x \in \mathbb{N}$ such that $6^{m}+4=x^{2}$. Then $6^{m}=(x-2)(x+2)$.

The numbers $x-2$ and $x+2$ differ by 4, so they give the same remainder when divided by 4. Their product is $2^{m} \cdot 3^{m}$. Their greatest common divisor $M(x-2, x+2)=M(x-2,4)$ can only be 1, 2, or 4.

If the greatest common divisor is 1, we get $x-2=2^{m}, x+2=3^{m}$. This is impossible because $2^{m}$ is even, and $3^{m}$ is odd.

If the greatest common divisor is 2, both numbers must give a remainder of 2 when divided by 4. This means $m=2$, but then $x^{2}=6^{2}+4=40$ is not a perfect square.

If the greatest common divisor is 4, we get $x-2=2^{m-2}, x+2=4 \cdot 3^{m}$. Clearly, $2^{m-2}+4<3^{m}$, so there is no solution in this case either.